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
Valine.min.js:formatted:2866 Uncaught DOMException: Failed to execute 'querySelectorAll' on 'Element': '.vfunction(){this.length=0}' is not a valid selector.
at r (http://unpkg.com/valine/dist/Valine.min.js:12:36952)
at Array.find (http://unpkg.com/valine/dist/Valine.min.js:7:2301)
at http://unpkg.com/valine/dist/Valine.min.js:12:19878
at o.bind (http://unpkg.com/valine/dist/Valine.min.js:12:20016)
at http://unpkg.com/valine/dist/Valine.min.js:12:12032
at http://unpkg.com/valine/dist/Valine.min.js:12:23934
at Function.sdkLoader (http://unpkg.com/valine/dist/Valine.min.js:7:4990)
at http://unpkg.com/valine/dist/Valine.min.js:7:5059
at HTMLScriptElement.n.onload.n.onreadystatechange (http://unpkg.com/valine/dist/Valine.min.js:7:4779)
版本 v1.4.14
启动报错
经排查是项目中同时引入了Swiftype站内搜索,st.js库在Array原型中添加了一些方法,导致遍历失败。
以下位置for循环遍历的时候,由于Array原型被污染,导致遍历出来很多不需要的属性。
测试代码
建议通过
hasOwnProperty
将原型中的属性过滤掉。The text was updated successfully, but these errors were encountered: