chrisfarber / ember-breadcrumbs

An Ember.js component for adding breadcrumbs to your app.
MIT License
79 stars 34 forks source link

Breadcrumb is null on page load #27

Closed simonprev closed 9 years ago

simonprev commented 9 years ago

Since 0.1.5, the breadcrumb component seems to be null on page load. But when I navigate to a page, it appears correctly. I’ve attached a gif showing the bug.

  1. First I start on a page. Breadcrumb is null
  2. Then I navigate to a nested page "Bookings > Location". The breadcrumb appears
  3. I go back to the page on step 1 but through a link. The breadcrumb is correct again
  4. I reload the entire page. Breadcrumb is null

preview

Code in the controller for the page in step 1:

breadCrumbs: function() {
  return [
    {label: 'Bookings', linkable: false}
  ];
}.property()

Code in the controller for the page in step 2:

breadCrumbs: function() {
  return [
    {
      label: 'Bookings'
      path: 'manage-resources.resource-type.index'
    },
    {
      label: this.get('model.resourceType.name'),
      linkable: false
    }
  ];
}.property('model.resourceType.name')

This code worked in the previous version.

Thanks!

chrisfarber commented 9 years ago

Thank you for the detailed report.

Precisely one thing changed for 0.1.5: an attempt to to fix issue #22.

I apologize that 0.1.5 is broken. I suggest downgrading to 0.1.4 – I'm going to remove the 0.1.5 release.

chrisfarber commented 9 years ago

I've released 0.1.6 that reverts that change and should resolve this issue. Please let me know if it doesn't.