Skip to content
Snippets Groups Projects
Commit d93ffc07 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Don't populate metadata property unless there is metadata

Or detail level is MAX.
parent db566e3c
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment