nikityy / ember-cli-bem

BEM naming for your Ember project
MIT License
19 stars 2 forks source link

Accessing a component with BEM mixin in Ember inspector causes ember inspector to crash #15

Open schickm opened 6 years ago

schickm commented 6 years ago

When I try and load up a component in the Ember inspector that has the ember-cli-bem/mixins/bem applied to it, it causes the Ember inspector to error out with the following in the console:

VM38853:92 Ember Inspector has errored.
This is likely a bug in the inspector itself.
You can report bugs at https://github.com/emberjs/ember-inspector.
Error message: Assertion Failed: You attempted to access `modsClassNames.type` (on `<ceannate-web@component:consent-documents/document-list::ember1447>`), but `modsClassNames` is a computed property.

Due to certain internal implementation details of Ember, the `modsClassNames` property previously contained a private "descriptor" object, therefore `modsClassNames.type` would have been `undefined`.

This implementation detail has now changed and the "descriptor" object is no longer present at this location. Soon, accessing `modsClassNames` on this object will return the computed property's current value (see RFC #281 for more details).

If you are seeing this error, you are likely using an addon that relies on this now-defunct private implementation detail. If you can, identify the addon from the stack trace below and report this bug to the addon authors. If you feel stuck, the Ember Community Slack (https://ember-community-slackin.herokuapp.com/) may be able to offer some help.

If you are an addon author and need help transitioning your code, please get in touch in the #dev-ember channel in the Ember Community Slack.
Stack trace: Error: Assertion Failed: You attempted to access `modsClassNames.type` (on `<ceannate-web@component:consent-documents/document-list::ember1447>`), but `modsClassNames` is a computed property.

Due to certain internal implementation details of Ember, the `modsClassNames` property previously contained a private "descriptor" object, therefore `modsClassNames.type` would have been `undefined`.

This implementation detail has now changed and the "descriptor" object is no longer present at this location. Soon, accessing `modsClassNames` on this object will return the computed property's current value (see RFC #281 for more details).

If you are seeing this error, you are likely using an addon that relies on this now-defunct private implementation detail. If you can, identify the addon from the stack trace below and report this bug to the addon authors. If you feel stuck, the Ember Community Slack (https://ember-community-slackin.herokuapp.com/) may be able to offer some help.

If you are an addon author and need help transitioning your code, please get in touch in the #dev-ember channel in the Ember Community Slack.
    at new EmberError (http://localhost:4200/assets/vendor.js:28634:25)
    at Object.assert (http://localhost:4200/assets/vendor.js:28877:15)
    at Object.get (http://localhost:4200/assets/vendor.js:38317:42)
    at addProperties (<anonymous>:3106:40)
    at mixin.mixins.forEach.mixin (<anonymous>:3077:11)
    at Array.forEach (<anonymous>)
    at propertiesForMixin (<anonymous>:3075:20)
    at Class.mixinsForObject (<anonymous>:2965:22)
    at Class.sendObject (<anonymous>:2884:26)
    at Class.inspectById (<anonymous>:2808:16)

Any ideas as to how I could refactor the library to play nicely with the latest Ember Inspector?

Here's what I'm currently running:

Ember Inspector | 3.3.2 Ember | 3.0.0 Ember Data | 3.0.2