Skip to content

Commit

Permalink
fix(view): Do not throw when uiView doesn't have a state context
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherthielen committed Mar 17, 2017
1 parent c3967bd commit f76ee2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/view/view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export class ViewService {
// plus the depth of the state that is populating the uiView
function uiViewDepth(uiView: ActiveUIView) {
const stateDepth = (context: ViewContext) =>
context.parent ? stateDepth(context.parent) + 1 : 1;
context && context.parent ? stateDepth(context.parent) + 1 : 1;
return (uiView.fqn.split(".").length * 10000) + stateDepth(uiView.creationContext);
}

Expand Down

0 comments on commit f76ee2a

Please sign in to comment.