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:
@@ -84,7 +84,6 @@ public:
|
|||||||
"catch (e) {"
|
"catch (e) {"
|
||||||
"try {"
|
"try {"
|
||||||
"function __wx$stringifyJSON(obj) {"
|
"function __wx$stringifyJSON(obj) {"
|
||||||
"var objElements = [];"
|
|
||||||
"if (!(obj instanceof Object))"
|
"if (!(obj instanceof Object))"
|
||||||
"return typeof obj === \"string\""
|
"return typeof obj === \"string\""
|
||||||
"? \'\"\' + obj + \'\"\'"
|
"? \'\"\' + obj + \'\"\'"
|
||||||
@@ -122,6 +121,7 @@ public:
|
|||||||
"}"
|
"}"
|
||||||
"return '\"' + obj.toISOString(); + '\"'"
|
"return '\"' + obj.toISOString(); + '\"'"
|
||||||
"}"
|
"}"
|
||||||
|
"var objElements = [];"
|
||||||
"for (var key in obj)"
|
"for (var key in obj)"
|
||||||
"{"
|
"{"
|
||||||
"if (typeof obj[key] === \"function\")"
|
"if (typeof obj[key] === \"function\")"
|
||||||
|
|||||||
Reference in New Issue
Block a user