Skip to content

Commit 1399dd4

Browse files
committed
Fix error when protocol list is empty
1 parent 8818139 commit 1399dd4

File tree

1 file changed

+4
-1
lines changed
  • frontend/src/store/protocolState

1 file changed

+4
-1
lines changed

frontend/src/store/protocolState/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ export const useProtocolStore = defineStore('protocol', {
99
},
1010
actions: {
1111
updateProtocol(protocol: ProtocolJson) {
12-
const entries = protocol.entry!
12+
const entries = protocol.entry
13+
if (!entries) {
14+
return
15+
}
1316
if (protocol.delta) {
1417
entries.reverse()
1518
for (const entry of entries) {

0 commit comments

Comments
 (0)