Skip to content

.get() with path breaks during transition #18174

Open
@luxzeitlos

Description

@luxzeitlos

In some cases this.get('foo.bar.value') does not work while this.get('foo').get('bar.value') works.
Both foo and bar are models, where foo has a bar: belongsTo('bar'). value is just a DS.attr('string').

I was able to reproduce this by triggering a transition before accessing, and then waiting a moment (a simple timeout promise works).

Reproduction

Just click other and then the button. This is not the same (first one is broken):

     console.log(`this.get('foo.bar.value')`, this.get('foo.bar.value'));
     console.log(`this.get('foo').get('bar.value')`, this.get('foo').get('bar.value'));

We discussed this a bit in chat with @runspired.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions