-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added check for secondaryMonitor before accessing members #20
added check for secondaryMonitor before accessing members #20
Conversation
src/modScaleThumbnails.js
Outdated
SecondaryMonitorDisplay.prototype._getThumbnailsHeight = function(box) { | ||
if (!this._thumbnails.visible) | ||
return 0; | ||
if (SecondaryMonitorDisplay) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please return instead of making nested code?
if (SecondaryMonitorDisplay) { | |
if (!SecondaryMonitorDisplay) return; // gnome 42: this object does not exist when there is only one monitor |
Thanks
Modified to return if SecondaryMonitorDisplay when it is not found. Removed second check (covered by function call).
// Thumbnails on second monitor | ||
if (!SecondaryMonitorDisplay) return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
May I also ask you to remove all other changes except for this line? (as no other changes actually change anything).
Thank you
Updated: removed my local revisions. |
Thanks. |
Fixed issue encountered in Gnome 42 where the secondary monitor was causing an issue on user login. Checking for secondary monitor prior to accessing members fixes the issue.