Skip to content

Commit c769100

Browse files
committed
fixed a bug where test contents stays after deleting a test
1 parent 439fd46 commit c769100

File tree

1 file changed

+9
-2
lines changed
  • packages/selenium-ide/src/neo/stores/view

1 file changed

+9
-2
lines changed

packages/selenium-ide/src/neo/stores/view/UiState.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,9 @@ class UiState {
216216
} else {
217217
this.selectCommand(undefined)
218218
}
219+
} else if (!_test) {
220+
this.selectedTest = {}
221+
this.selectCommand(undefined)
219222
}
220223
}
221224
}
@@ -289,8 +292,12 @@ class UiState {
289292
PlaybackState.paused ||
290293
opts.isCommandTarget
291294
) {
292-
this.selectedTest.test.selectedCommand = command
293-
this.selectedCommand = command
295+
if (this.selectedTest.test) {
296+
this.selectedTest.test.selectedCommand = command
297+
this.selectedCommand = command
298+
} else {
299+
this.selectedCommand = undefined
300+
}
294301
}
295302
}
296303

0 commit comments

Comments
 (0)