diff --git a/src/stores/base.js b/src/stores/base.js index 47a267ce1fb..b5aea44829d 100644 --- a/src/stores/base.js +++ b/src/stores/base.js @@ -195,9 +195,10 @@ const useBaseStore = defineStore('base', { this.appInfo.newConfigVersion = data.newConfigVersion }, setZnifferState(data) { - this.znifferState.error = data?.error ?? '' - this.znifferState.started = data?.started ?? false - this.znifferState.frequency = data?.frequency ?? false + this.znifferState = { + ...this.znifferState, + ...data, + } }, setValue(valueId) { const toReplace = this.getValue(valueId) diff --git a/src/views/Zniffer.vue b/src/views/Zniffer.vue index 0918825c67f..490c5924534 100644 --- a/src/views/Zniffer.vue +++ b/src/views/Zniffer.vue @@ -299,9 +299,7 @@ export default { } }, znifferState(state) { - if (state?.frequency) { - this.frequency = state.frequency - } + this.frequency = state.frequency ?? null }, search(v) { if (this.searchTimeout) {