Skip to content

Commit f76ee2a

Browse files
fix(view): Do not throw when uiView doesn't have a state context
1 parent c3967bd commit f76ee2a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/view/view.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ export class ViewService {
172172
// plus the depth of the state that is populating the uiView
173173
function uiViewDepth(uiView: ActiveUIView) {
174174
const stateDepth = (context: ViewContext) =>
175-
context.parent ? stateDepth(context.parent) + 1 : 1;
175+
context && context.parent ? stateDepth(context.parent) + 1 : 1;
176176
return (uiView.fqn.split(".").length * 10000) + stateDepth(uiView.creationContext);
177177
}
178178

0 commit comments

Comments
 (0)