Don't define "objElements" in JavaScript code unless we need it

This variable is only used when dumping object fields, so define it
there both as a micro-optimization and for clarity.
This commit is contained in:
Vadim Zeitlin
2017-10-22 18:01:04 +02:00
parent d1c15bfe0e
commit 40b629641b

View File

@@ -84,7 +84,6 @@ public:
"catch (e) {"
"try {"
"function __wx$stringifyJSON(obj) {"
"var objElements = [];"
"if (!(obj instanceof Object))"
"return typeof obj === \"string\""
"? \'\"\' + obj + \'\"\'"
@@ -122,6 +121,7 @@ public:
"}"
"return '\"' + obj.toISOString(); + '\"'"
"}"
"var objElements = [];"
"for (var key in obj)"
"{"
"if (typeof obj[key] === \"function\")"