dillon1000/react

Commit

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.
Browse files
Changed paths5 files
First-parent comparison
M compiler/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 Added
Patch

Files changed

Rendering syntax-highlighted changes…