fix: 修复开发者模式下listening为undefined的问题

This commit is contained in:
ZiuChen 2022-10-10 19:06:02 +08:00
parent 8ac19335f2
commit 85291cd2cf
2 changed files with 2 additions and 2 deletions

View File

@ -223,7 +223,7 @@ onMounted(() => {
updateShowList(activeTab.value)
//
if (!utools.isMacOs() && window.listener.listening) {
if (!utools.isMacOs() && window.listener?.listening) {
// macOS
window.listener.on('change', () => {
list.value = window.db.dataBase.data

View File

@ -183,7 +183,7 @@ const handleRestoreBtnClick = () => {
}
onMounted(() => {
listenStatus.value = window.listener.listening
listenStatus.value = window.listener?.listening
})
</script>