Commit 2b047cf6 authored by Rob Swindell's avatar Rob Swindell 💬
Browse files

Don't populate metadata property unless there is metadata

Or detail level is MAX.
parent 1c96d408
Pipeline #2161 passed with stage
in 7 minutes and 37 seconds
......@@ -291,7 +291,7 @@ set_file_properties(JSContext *cx, JSObject* obj, file_t* f, enum file_detail de
return false;
}
if(((f->content != NULL && *f->content != '\0') || detail >= file_detail_content)
if(((f->content != NULL && *f->content != '\0') || detail > file_detail_content)
&& ((js_str = JS_NewStringCopyZ(cx, f->content)) == NULL
|| !JS_DefineProperty(cx, obj, "metadata", STRING_TO_JSVAL(js_str), NULL, NULL, flags)))
return false;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment