dillon1000/react
Commit
Browse files PropagateScopeDeps treats switch w only default as unconditional
If we have a switch with only a default case, then that code will be executed unconditionally. PropagateScopeDeps can take advantage of this to record dependencies in these cases as unconditional, which avoids the issue seen in the previous PR.
Changed paths5 files
First-parent comparisoncompiler/packages/babel-plugin-react-forget/src/ReactiveScopes/PropagateScopeDependencies.ts ModifiedD compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/error.todo-switch-with-only-default.expect.md DeletedD compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/error.todo-switch-with-only-default.js DeletedA compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/switch-with-only-default.expect.md AddedA compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/switch-with-only-default.js AddedPatch
Files changed
Rendering syntax-highlighted changes…