Merge pull request #1216 from johankwarnmarksymphony/sda-3143

fix: To avoid the pop up and save the error in the log
This commit is contained in:
Johan Kwarnmark 2021-05-05 11:37:17 +02:00 committed by GitHub
commit ffb276bdfc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -63,7 +63,17 @@ export default class NotificationHandler {
y: number = 0, y: number = 0,
) { ) {
if (window && !window.isDestroyed()) { if (window && !window.isDestroyed()) {
window.setPosition(parseInt(String(x), 10), parseInt(String(y), 10)); try {
window.setPosition(parseInt(String(x), 10), parseInt(String(y), 10));
} catch (err) {
console.warn(
'Failed to set window position. x: ' +
x +
' y: ' +
y +
'. Contact the developers for more details',
);
}
} }
} }