Browse files

Support apps without a router

  • Loading branch information...
1 parent dad611c commit e846f504c9a69e191abf34bf46d730dd0b2357f6 @wagenet wagenet committed Oct 8, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 packages/ember-data/lib/system/application_ext.js
View
2 packages/ember-data/lib/system/application_ext.js
@@ -6,6 +6,7 @@ Ember.onLoad('Ember.Application', function(Application) {
before: "controllers",
injection: function(app, stateManager, property) {
+ if (!stateManager) { return; }
if (property === 'Store') {
set(stateManager, 'store', app[property].create());
}
@@ -16,6 +17,7 @@ Ember.onLoad('Ember.Application', function(Application) {
name: "giveStoreToControllers",
injection: function(app, stateManager, property) {
+ if (!stateManager) { return; }
if (/^[A-Z].*Controller$/.test(property)) {
var controllerName = property.charAt(0).toLowerCase() + property.substr(1);
var store = stateManager.get('store');

0 comments on commit e846f50

Please sign in to comment.