TypeError: Error processing argument at index 0
sokki opened this issue · comments
For a few of our windows-(10)-user it happens sporadically that they end up with a "x":null
in their window-state.json
like:
{"width":483,"height":681,"x":null,"y":48,"isMaximized":true,"isFullScreen":false,"displayBounds":{"x":0,"y":0,"width":1280,"height":720}}
This prevents the app from start until they manually delete/fix the json:
Uncaught Exception:
TypeError: Error processing argument at index 0, conversion failure from #<Object>
at TypeError (native)
at validateState (<APP>/node_modules/electron-window-state/index.js:47:34)
at module.exports (<APP>/node_modules/electron-window-state/index.js:155:3)
at createMainWindow (<APP>/src/main.js:26:25)
at App.<anonymous> (<APP>/src/main.js:58:18)
at emitTwo (events.js:106:13)
at App.emit (events.js:191:7)
I think it's the state.x = null;
in validateState()
that should be state.x = 0;
or state.x = undefined;
!?
Versions
- electron 1.3.10
- electron-compile 4.0.2
- electron-window-state 3.1.0