Skip to content
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.

Fix error: cannot read property getPrimaryDisplay of null - Closes #1025 #1027

Merged
merged 1 commit into from
Jan 12, 2018

Conversation

slaweet
Copy link
Contributor

@slaweet slaweet commented Jan 12, 2018

What was the problem?

It appears that OS X is triggering the activate event before the app is ready for some reason, which means that electron.screen hasn't loaded yet.

which causes cannot read property getPrimaryDisplay of null error

How did I fix it?

As suggested in #1025 (comment)

How to test it?

It might be hard due to random nature of the bug, but here is one hint:

According to the Electron docs, this event "usually happens when the user clicks on the application’s dock icon", but I guess it can happen at other times as well.

Review checklist

@slaweet slaweet force-pushed the 1025-get-primary-display-bug branch from 28f933f to 709ab1b Compare January 12, 2018 11:41
Copy link
Contributor

@ginacontrino ginacontrino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you

@slaweet slaweet merged commit b0484f1 into 1.3.2 Jan 12, 2018
@slaweet slaweet deleted the 1025-get-primary-display-bug branch January 12, 2018 14:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants