Repository navigation
winners don't do null - #843
Conversation
Just providing another datapoint. I ran into this issue and removing window-state.json file worked. |
|
EDIT: Nevermind, this was just my naive fix not picking up the fact that the build servers didn't have the cached |
d6fd1e7 to
46bd0c2
Compare
46bd0c2 to
f0a4e23
Compare
83a8b37 to
9c098d0
Compare
| } | ||
|
|
||
| let text: string | null = null | ||
| const result = Fs.readFileSync(filePath) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
|
||
| if (text) { | ||
| const json = JSON.parse(text) | ||
| if (json.x === null) { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| const file = 'window-state.json' | ||
| const filePath = Path.join(userData, file) | ||
|
|
||
| if (!Fs.existsSync(filePath)) { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
🐨 |
|
@shiftkey What about the part of only writing when necessary: #843 (comment) ? |
|
@niik oops, I missed that check. Let me make this conditional. |
The one and only @robrix found an issue with his beta install, where the
window-state.jsonfile at~/Library/Application Support/GitHub Desktop/looked like this:The
"x": nullvalue at the end triggers an error insideelectron-window-statewhen it doesscreen.getDisplayMatching()and prevents the app from launching. The serializing of the values is now corrected in mawie81/electron-window-state#16, but that doesn't help existing installs who might already be in a broken state.I've taken a stab at this in f0a4e23 but perhaps it's not necessary - and removing the file is a "good enough" workaround here. @desktop/core let me know your feels on including that too.