TypeError:尝试分配给readonly属性。在iOS8 Safari上 [英] TypeError: Attempted to assign to readonly property. on iOS8 Safari

查看:1558
本文介绍了TypeError:尝试分配给readonly属性。在iOS8 Safari上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您在我的网站上此页面在桌面浏览器上运行良好,但在iOS8 Safari上有一个奇怪的错误:

Hi this page on my site works fine on desktop browser, but has a weird bug on iOS8 Safari:

索引模板没有显示,控制台出错:

The index template doesn't show up, and there's a error in the console:

TypeError:Attempted分配给只读属性。

TypeError: Attempted to assign to readonly property.

它指向以下行:

}), e("rsvp/promise/all", ["../utils", "exports"], function(e, t) {
    "use strict";
    var r = e.isArray, n = e.isNonThenable;
    t["default"] = function(e, t) {
        var i = this;
        return new i(function(t, a) {
            function o(e) {
                return function(r) {
                    c[e] = r, 0===--u && t(c)
                }
            }
            function s(e) {
                u = 0, a(e)
            }
            if (!r(e))
                throw new TypeError("You must pass an array to all.");
            var l, u = e.length, c = new Array(u);
            if (0 === u) // This is the line with error
                return void t(c);
            for (var h = 0; h < e.length; h++)
                l = e[h], n(l) ? (c[h] = l, 0===--u && t(c)) : i.cast(l).then(o(h), s)
        }, t)
    }
}), e("rsvp/promise/cast", ["exports"], function(e) {
    "use strict";

这是移动游猎的已知错误,有没有修复?

Is it a known bug to mobile safari, is there fix of it?

推荐答案

RSVP的维护者,很抱歉您遇到了这个问题。

Maintainer of RSVP here, sorry that you ran into this issue.

首先,您似乎使用的是较旧版本的RSVP我建议升级。

Firstly, it appears you are using an older version of RSVP. I would recommend upgrading.

不幸的是,这个问题可能与 http://github.com/emberjs/ember.js/pull/5629 出现只是因为运行iOS 8的非64位设备的JSC刚刚被打破当处于'use strict'模式时。在我的观察中,它只在特定情况下发生,然后才会在有问题的代码被优化时发生。

Unfortunately it appears this issue may be related to https://github.com/emberjs/ember.js/pull/5629 which appears to just be that JSC for non-64bit devices running iOS 8 is just broken when in 'use strict' mode. In my observations it only happens in specific situations and then only when the code in question has become optimized.

再次我不确定是否升级会帮助你,但你应该考虑它此外,如果问题仍然存在,删除所有使用严格语句可能是最好的选择。

Again I am unsure if upgrading will help you, but you should consider it regardless. Additionally, if the problem persists removing all use strict statements may be the best option.

如果很快没有出现解决方案,我可能会在删除use strict语句的情况下发布RSVP更新。

If no solution appears soon, I will likely publish an update to RSVP with the use strict statements removed.

这篇关于TypeError:尝试分配给readonly属性。在iOS8 Safari上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆