Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REGRESSION] In 1.13.2 "TypeError: Cannot read property 'key' of null at advanceToKey" #11504

Closed
toranb opened this issue Jun 18, 2015 · 10 comments · Fixed by #11525
Closed

[REGRESSION] In 1.13.2 "TypeError: Cannot read property 'key' of null at advanceToKey" #11504

toranb opened this issue Jun 18, 2015 · 10 comments · Fixed by #11525

Comments

@toranb
Copy link
Contributor

toranb commented Jun 18, 2015

Yesterday I upgraded from 1.12.1 to 1.13.1 w/ no issue. Today I upgraded from 1.13.1 to 1.13.2 and get the error

TypeError: Cannot read property 'key' of null at advanceToKey

This occurs as I transition from a detail route to the parent that has a simple each loop like so

{{#each sortedThings as |thing index| }}
{{/each}}

I have a special sort mixin that rolls through and sorts by a special attr

var SortedThingsMixin = Ember.Mixin.create({
    sortedThings: Ember.computed(function() {
        return this.get("model").toArray().sort(function(a, b) {
            var first = a.get("foo");
            var second = b.get("foo");
            return Ember.compare(first, second);
        });
    }).property("[email protected]") //hack to watch nested array
});

I realize a full jsbin is more useful here - I'll see if I can reproduce it for clarity. In the meantime I wanted to get this up quick for others who might be having the same issue

@rwjblue
Copy link
Member

rwjblue commented Jun 18, 2015

I believe this is related to @cibernox's issue mentioned in tildeio/htmlbars@eeb4bf8#commitcomment-11742721.

@toranb
Copy link
Contributor Author

toranb commented Jun 18, 2015

@rwjblue Ah yes- that seek issue is what I'm seeing :) thanks dude!

@toranb
Copy link
Contributor Author

toranb commented Jun 18, 2015

@rwjblue I'll let you decide to close this out /or use this to track the regression :)

@rwjblue
Copy link
Member

rwjblue commented Jun 18, 2015

Will leave it open here to track. I think we need a reproduction to properly track this down (and get whatever is going wrong under test).

@cibernox
Copy link
Contributor

Keep this open. It's the same issue. My scenario is complex and not easy to reproduce, but I'll try anyway.

@btecu
Copy link
Contributor

btecu commented Jun 18, 2015

Seems to be the same issue as #11500.

@rwjblue
Copy link
Member

rwjblue commented Jun 18, 2015

@btecu - Yep, agreed. I still need help reproducing so we can fix...

@btecu
Copy link
Contributor

btecu commented Jun 18, 2015

Here is a jsbin reproducing the error: http://jsbin.com/tuxugupoxe/edit?html,js,console,output

If you remove the unshift line, it should work.

@jamesarosen
Copy link

I don't have a JSBin of it, but I've run into it while working on an addon. If you pull down knownasilya/pagination-pager#14 and click through the pagination with ellipses (click 50, 49, 48, 47, 46, 45), you'll get this error.

See also #11500

@rwjblue
Copy link
Member

rwjblue commented Jun 20, 2015

#11525 provides a useful error in this case until we can fix it upstream in HTMLBars.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants