Skip to content

Commit 7a15a3f

Browse files
committed
Add invariant for unreachable condition
1 parent d484f31 commit 7a15a3f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/execution/execute.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,10 @@ function completeValue(
732732
}
733733

734734
// Not reachable
735-
return null;
735+
invariant(
736+
false,
737+
`Cannot complete value of unexpected type "${returnType}".`
738+
);
736739
}
737740

738741
/**

0 commit comments

Comments
 (0)