We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 752724c commit fc10d12Copy full SHA for fc10d12
packages/app/src/app/components/Preview/DevTools/Tests/index.tsx
@@ -384,6 +384,10 @@ class Tests extends React.Component<DevToolProps, State> {
384
385
this.setState(oldState =>
386
immer(oldState, state => {
387
+ if (!state.files[test.path]) {
388
+ return;
389
+ }
390
+
391
const existingTest =
392
state.files[test.path].tests[testName.join('||||')];
393
@@ -486,7 +490,9 @@ class Tests extends React.Component<DevToolProps, State> {
486
490
this.setState(
487
491
oldState =>
488
492
489
- state.files[file.fileName].tests = {};
493
+ if (state.files[file.fileName]) {
494
+ state.files[file.fileName].tests = {};
495
496
}),
497
() => {
498
dispatch({
0 commit comments