Uncaught TypeError: Cannot read property 'name' of undefined in cornerstone

Hello,

I have had this issue on a couple sites now when I upgrade X and cornerstone. Once I go to edit a page in cornerstone it throws this js exception below. I have had to roll back one site to mitigate this issue, but I tried updating another and am still receiving the same issue.

Uncaught TypeError: Cannot read property 'name' of undefined
at r.init (cs.js?ver=3.5.2:formatted:39529)
at r [as init] (cs-vendor.js?ver=3.5.2:2428)
at r.e (cs-vendor.js?ver=3.5.2:2378)
at r (cs-vendor.js?ver=3.5.2:2382)
at r (cs-vendor.js?ver=3.5.2:2382)
at new r (cs-vendor.js?ver=3.5.2:2382)
at Function.e.create (cs-vendor.js?ver=3.5.2:2383)
at e.create (cs-vendor.js?ver=3.5.2:1154)
at cs-vendor.js?ver=3.5.2:1135
at u (cs-vendor.js?ver=3.5.2:1141)

If you beautify the code, this is the resulting area where there error is happening. It does go in here a couple times, the first t.default is defined but the second time t.default is no longer defined and this exception is being thrown. This makes the editor unusable and you can no longer edit any content.

    define("tco-app/services/browser", ["exports", "bowser"], function(e, t) {
    Object.defineProperty(e, "__esModule", {
        value: !0
    }),
    e.default = Ember.Service.extend({
        init: function() {
            this._super.apply(this, arguments),
            this.set("browserName", Ember.String.dasherize(t.default.name)),
            this.set("browserVersion", Ember.String.dasherize(parseInt(t.default.version).toString()))
        },
        isIE: Ember.computed(function() {
            return t.default.msie
        }),
        isEdge: Ember.computed(function() {
            return t.default.msedge
        }),
        browserClass: Ember.computed("browserName", "browserVersion", function() {
            var e = this.get("browserVersion")
              , t = this.get("browserName")
            return "cs-browser-" + t + " cs-browser-" + t + "-" + e
        })
    })
 }), 

If you have any suggestions, it would be greatly appreciated, otherwise we’ll be stuck on Version 3.2.5 of cornerstone.

Thanks,
Curtis

Edit: This is in cs.js

Hi Curtis,

I checked in my test sites but I am not getting this error.

You could try testing for a plugin conflict. You can do this by deactivating all third party plugins, and seeing if the problem remains. If it’s fixed, you’ll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time.

If you have any custom js, try removing it to and check if its the one causing the issue.

Thanks

Great, thank you for the reply. There was some custom js that had a global variable which seemed to screw things up!

Thanks for the help!

Curtis

You’ re most welcome Curtis! :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.