You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by ac...@apache.org on 2017/08/11 09:19:16 UTC
[3/7] incubator-weex git commit: * [jsfm] donot normalize object add
array in deep
* [jsfm] donot normalize object add array in deep
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/45781624
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/45781624
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/45781624
Branch: refs/heads/0.16-dev
Commit: 45781624d88bf8e57ab3d6b1a01f84d37aff9fea
Parents: a68cc07
Author: Hanks <zh...@gmail.com>
Authored: Fri Aug 11 16:24:38 2017 +0800
Committer: Hanks <zh...@gmail.com>
Committed: Fri Aug 11 16:24:38 2017 +0800
----------------------------------------------------------------------
html5/runtime/normalize.js | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/45781624/html5/runtime/normalize.js
----------------------------------------------------------------------
diff --git a/html5/runtime/normalize.js b/html5/runtime/normalize.js
index b5fab23..f1e93b8 100644
--- a/html5/runtime/normalize.js
+++ b/html5/runtime/normalize.js
@@ -47,18 +47,9 @@ export function normalizePrimitive (v) {
case 'Number':
case 'String':
case 'Boolean':
- return v
-
case 'Array':
- return v.map(normalizePrimitive)
-
- case 'Object': {
- const obj = {}
- for (const k in v) {
- obj[k] = normalizePrimitive(v[k])
- }
- return obj
- }
+ case 'Object':
+ return v
case 'ArrayBuffer':
return {