Skip to content

Commit 52e650b

Browse files
committed
Don't crash when encounter unknown node like as
Fix #133
1 parent 06c6095 commit 52e650b

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/rules/reactivity.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -843,6 +843,7 @@ export default createRule<Options, MessageIds>({
843843
this.skip(); // poor-man's `findInScope`: don't enter child scopes
844844
}
845845
},
846+
fallback: "iteration", // Don't crash when encounter unknown node.
846847
});
847848
};
848849

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// @ts-nocheck
2+
import { createSignal } from "solid-js";
3+
import { render } from "solid-js/web";
4+
5+
function App() {
6+
const [a] = createSignal("a" as string);
7+
8+
return <div>{a()}</div>;
9+
}
10+
11+
render(() => <App />, document.getElementById("app"));

0 commit comments

Comments
 (0)