Skip to content

Ember inspector fails to inspect model when enableIsDirty is set #47

@kltdwrds

Description

@kltdwrds

config:
changeTracker: { trackHasMany: true, auto: true, enableIsDirty: true }

attempting to inspect a model renders:

You can report bugs at https://github.com/emberjs/ember-inspector.
Error message: Assertion Failed: You attempted to access `hasDirtyAttributes.type` (on `<safechain-ops-ui@model:order::ember635:gy1m2Zv>`), but `hasDirtyAttributes` is a computed property.

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

This implementation detail has now changed and the "descriptor" object is no longer present at this location. Soon, accessing `hasDirtyAttributes` 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 `hasDirtyAttributes.type` (on `<safechain-ops-ui@model:order::ember635:gy1m2Zv>`), but `hasDirtyAttributes` is a computed property.

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

This implementation detail has now changed and the "descriptor" object is no longer present at this location. Soon, accessing `hasDirtyAttributes` 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>:3145:40)
    at mixin.mixins.forEach.mixin (<anonymous>:3116:11)
    at Array.forEach (<anonymous>)
    at propertiesForMixin (<anonymous>:3114:20)
    at Class.mixinsForObject (<anonymous>:3004:22)
    at Class.sendObject (<anonymous>:2923:26)
    at Class.inspectModel (<anonymous>:740:37)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions