Skip to content

Commit

Permalink
Merge pull request #3690 from rwjblue/fix-reregistration
Browse files Browse the repository at this point in the history
[BUGFIX release-1-13] Ensure that `service:store` is cleared before regsitering.
  • Loading branch information
bmac committed Sep 10, 2015
2 parents 8a6afa1 + 7a70e9a commit 8f3200f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/ember-data/lib/initializers/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,10 @@ export default function initializeStore(registry, application) {
}

if (store) {
registry.unregister('service:store');
registry.register('service:store', store, { instantiate: false });
} else if (!registry.has('service:store')) {
registry.unregister('service:store');
registry.register('service:store', application && application.Store || Store);
}
}

0 comments on commit 8f3200f

Please sign in to comment.