Browse Source

test(weex): avoid @binding key warnings

dev
Evan You 7 years ago
parent
commit
bb8e8f44a9
  1. 12
      src/core/vdom/create-element.js

12
src/core/vdom/create-element.js

@ -69,11 +69,13 @@ export function _createElement (
if (process.env.NODE_ENV !== 'production' &&
isDef(data) && isDef(data.key) && !isPrimitive(data.key)
) {
warn(
'Avoid using non-primitive value as key, ' +
'use string/number value instead.',
context
)
if (!__WEEX__ || !('@binding' in data.key)) {
warn(
'Avoid using non-primitive value as key, ' +
'use string/number value instead.',
context
)
}
}
// support single function children as default scoped slot
if (Array.isArray(children) &&

Loading…
Cancel
Save