undefined 'this.patchIndexes.length'
发布于 4 年前 作者 yangxiong 7546 次浏览 来自 问答

SDKVersion 1.9.0

brand iPhone

model iPhone 6s<iPhone8,1>

system iOS 11.2.1

version 6.6.1

目前还不知如何复现,小程序正常使用情况下,有机率发生如下错误:

exparserScriptError value[@https](/user/https): undefined is not an object (evaluating 'this.patchIndexes.length')
    https://servicewechat.com/wxb80108bc52854112/14/page-frame.html:19:12569 value
    https://servicewechat.com/wxb80108bc52854112/14/page-frame.html:19:293 value
    https://servicewechat.com/wxb80108bc52854112/14/page-frame.html:7:920
    https://servicewechat.com/wxb80108bc52854112/14/page-frame.html:6:8219 doUpdates
    https://servicewechat.com/wxb80108bc52854112/14/page-frame.html:19:7112 applyProperties
    https://servicewechat.com/wxb80108bc52854112/14/page-frame.html:19:2835 value
    https://servicewechat.com/wxb80108bc52854112/14/page-frame.html:19:2913
    [native code] forEach
    https://servicewechat.com/wxb80108bc52854112/14/page-frame.html:19:2886 value
    https://servicewechat.com/wxb80108bc52854112/14/page-frame.html:18:31496 value
    https://servicewechat.com/wxb80108bc52854112/14/page-frame.html:7:1043 _advancedCreate
    https://servicewechat.com/wxb80108bc52854112/14/page-frame.html:7:2086 create
    https://servicewechat.com/wxb80108bc52854112/14/page-frame.html:19:2114 value
    https://servicewechat.com/wxb80108bc52854112/14/page-frame.html:19:2913
    [native code] forEach
    https://servicewechat.com/wxb80108bc52854112/14/page-frame.html:19:2886 value
    https://servicewechat.com/wxb80108bc52854112/14/page-frame.html:18:31496 value
    https://servicewechat.com/wxb80108bc52854112/14/page-frame.html:7:1043 _advancedCreate
    https://servicewechat.com/wxb80108bc52854112/14/page-frame.html:7:2086 create
    https://servicewechat.com/wxb80108bc52854112/14/page-frame.html:18:27023 L
    https://servicewechat.com/wxb80108bc52854112/14/page-frame.html:18:16827 value
    https://servicewechat.com/wxb80108bc52854112/14/page-frame.html:17:27826 value
    https://servicewechat.com/wxb80108bc52854112/14/page-frame.html:19:19222 h
    https://servicewechat.com/wxb80108bc52854112/14/page-frame.html:19:20624 f
    https://servicewechat.com/wxb80108bc52854112/14/page-frame.html:19:19827
    https://servicewechat.com/wxb80108bc52854112/14/page-frame.html:19:24321
    https://servicewechat.com/wxb80108bc52854112/14/page-frame.html:4:24866
    https://servicewechat.com/wxb80108bc52854112/14/page-frame.html:5:5015 emit
    https://servicewechat.com/wxb80108bc52854112/14/page-frame.html:5:26854
    https://servicewechat.com/wxb80108bc52854112/14/page-frame.html:5:12851
    https://servicewechat.com/wxb80108bc52854112/14/page-frame.html:2:2174 x
    https://servicewechat.com/wxb80108bc52854112/14/page-frame.html:1:72 global code

发生在内核程式库

a = function() {
    function e(t, n) {
        r(this, e), this.oldTree = t, this.patches = n, this.patchIndexes = Object.keys(this.patches).map(function(e) {
            return Number(e)
        })
    }
 
    return o(e, [{
        key: "apply",
        value: function(e) {
            var t = this;
            if (0 === this.patchIndexes.length) return e;
            var n = (0, i.getDomIndex)(e, this.oldTree, this.patchIndexes);
            return this.patchIndexes.forEach(function(e) {
                var r = n[e];
                if (r) {
                    t.patches[e].forEach(function(e) {
                        e.apply(r)
                    })
                }
            }), e
        }
    }]), e
}();

看似不明原因,this.patchIndexes.lengththis.patchIndexes undefined

请问要如何避免这个错误,谢谢

2 回复

感谢反馈,是个比较复杂的内核错误。我们查一下。

回到顶部