To avoid the pop up and save the error in the log

This commit is contained in:
Johan Kwarnmark 2021-05-04 17:13:33 +02:00
parent 5e13a29106
commit 64c26c7e5d

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',
);
}
} }
} }