[英]Expecting a function in instanceof check, but got undefined
I am getting this weird error while working on a Polymer component and that is not it the biggest problem is that chrome somehow crashes when I try to debug the Polymer library. 我在处理Polymer组件时遇到这个奇怪的错误,这不是最大的问题是,当我尝试调试Polymer库时,chrome以某种方式崩溃了。 I am at my wits end trying to solve this bug.
我尽力解决这个错误。
The premise is simple I have a component with property data
which is an array and it's changed by another component by setting it like someComponent.set('data', []);
前提很简单,我有一个带有属性
data
的组件,该组件是一个数组,可以通过将其设置为someComponent.set('data', []);
更改它someComponent.set('data', []);
. 。 The set happens multiple times and the value set on
data
changes, at one point when the value is being set the error in title is thrown. 该设置发生多次,并且对
data
设置的值发生更改,在设置该值的某一时刻,会引发标题错误。 Following is the stack trace, since I can't reproduce the bug in a jsbin. 以下是堆栈跟踪,因为我无法在jsbin中重现该错误。
Polymer.dom @ polymer-mini.html:1040 Polymer.Base._addFeature.serializeValueToAttribute @ polymer.html:3416 Polymer.Base._addFeature.reflectPropertyToAttribute @ polymer-micro.html:593 Polymer.Base.extend._reflectEffect @ polymer.html:1607 Polymer.Bind._modelApi._effectEffects @ polymer.html:1461 Polymer.Bind._modelApi._propertySetter @ polymer.html:1445 setter @ polymer.html:1524 Polymer.Base._addFeature.set @ polymer.html:2103 Polymer.updateTargets @ t-demo-atom.html:234
Maybe this would work: 也许这会工作:
-in the child, create a function to set data to an incoming value -在子级中,创建一个将数据设置为传入值的函数
-in the father, just call that function instead of setting the data value yourself -在父亲中,只需调用该函数即可,而不是自己设置数据值
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.