Skip to content

Commit bb8e8f4

Browse files
committed
test(weex): avoid @binding key warnings
1 parent 8134095 commit bb8e8f4

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

Diff for: src/core/vdom/create-element.js

+7-5
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,13 @@ export function _createElement (
6969
if (process.env.NODE_ENV !== 'production' &&
7070
isDef(data) && isDef(data.key) && !isPrimitive(data.key)
7171
) {
72-
warn(
73-
'Avoid using non-primitive value as key, ' +
74-
'use string/number value instead.',
75-
context
76-
)
72+
if (!__WEEX__ || !('@binding' in data.key)) {
73+
warn(
74+
'Avoid using non-primitive value as key, ' +
75+
'use string/number value instead.',
76+
context
77+
)
78+
}
7779
}
7880
// support single function children as default scoped slot
7981
if (Array.isArray(children) &&

0 commit comments

Comments
 (0)