Skip to content

Commit

Permalink
fix(view): temporary sanity check that a node exists
Browse files Browse the repository at this point in the history
closes #2657
  • Loading branch information
christopherthielen committed Apr 3, 2016
1 parent 3a1160d commit 1c0edeb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/ng1/services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,10 @@ function getTransitionsProvider() {
loadAllControllerLocals.$inject = ['$transition$'];
function loadAllControllerLocals($transition$) {
const loadLocals = (vc: Ng1ViewConfig) => {
let resolveCtx = (<Node> find($transition$.treeChanges().to, propEq('state', vc.viewDecl.$context))).resolveContext;
let node = (<Node> find($transition$.treeChanges().to, propEq('state', vc.viewDecl.$context)));
// Temporary fix; This whole callback should be nuked when fixing #2662
if (!node) return services.$q.when();
let resolveCtx = node.resolveContext;
let controllerDeps = annotateController(vc.controller);
let resolvables = resolveCtx.getResolvables();

Expand Down

0 comments on commit 1c0edeb

Please sign in to comment.