Skip to content

Instantly share code, notes, and snippets.

@joliss
Created April 1, 2013 23:51
Show Gist options
  • Save joliss/5288787 to your computer and use it in GitHub Desktop.
Save joliss/5288787 to your computer and use it in GitHub Desktop.
diff --git a/packages/ember-application/lib/system/application.js b/packages/ember-application/lib/system/application.js
index 76ceffe..1f45e96 100644
--- a/packages/ember-application/lib/system/application.js
+++ b/packages/ember-application/lib/system/application.js
@@ -446,9 +446,11 @@ var Application = Ember.Application = Ember.Namespace.extend(Ember.DeferredMixin
},
reset: function() {
- var oldContainer = get(this, '__container__');
- set(this, '__container__', null);
- oldContainer.destroy();
+ Ember.run(this, function() {
+ var oldContainer = get(this, '__container__');
+ set(this, '__container__', null);
+ oldContainer.destroy();
+ });
this.buildContainer();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment