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) {"
|
||||
"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\")"
|
||||
|
Reference in New Issue
Block a user