You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// FormItem.jsfunctiondecoratorOption(vnode){if(vnode.data&&vnode.data.directives){vardirective=find(vnode.data.directives,['name','decorator']);// 取到的directive为undefined,因为此时的directives是包含 自定义组件v-clearData的warning(!directive||directive&&Array.isArray(directive.value),'Invalid directive: type check failed for directive "decorator". Expected Array, got '_typeof(directive.value)'. At 'vnode.tag'.');// 导致directive.value报错returndirective ? directive.value : null;}else{returnnull;}}
What is expected?
warning(!directive||directive&&Array.isArray(directive.value),'Invalid directive: type check failed for directive "decorator". Expected Array, got '_typeof(directive.value)'. At 'vnode.tag'.');
Version
1.3.10
Environment
macOS10.14 chrome75 Vue2.6.10
Reproduction link
Steps to reproduce
What is expected?
期望当directive为undefined时,_typeof(directive.value) 做兼容
What is actually happening?
TypeError: Cannot read property 'value' of undefined at VueComponent.decoratorOption
在全局定义了自定义directive时
The text was updated successfully, but these errors were encountered: