修复没有配置文件时程序启动出错的问题

This commit is contained in:
lyswhut
2019-10-27 11:58:55 +08:00
parent 10ef80da75
commit 46aacba037
3 changed files with 12 additions and 18 deletions
+1 -1
View File
@@ -3,6 +3,6 @@ const { windowSizeList } = require('../../common/config')
exports.getWindowSizeInfo = () => {
let electronStore = new Store()
const { windowSizeId = 1 } = electronStore.get('setting')
const { windowSizeId = 1 } = electronStore.get('setting') || {}
return windowSizeList.find(i => i.id === windowSizeId) || windowSizeList[0]
}