fix: exception on app start setting window title

This commit is contained in:
Fabio Di Stasio 2022-06-08 14:55:29 +02:00
parent 00242697a1
commit 5b33419b64
3 changed files with 4 additions and 4 deletions

View File

@ -92,7 +92,7 @@ else {
});
ipcMain.on('change-window-title', (event, title: string) => {
mainWindow.setTitle(title);
if (mainWindow) mainWindow.setTitle(title);
});
// quit application when all windows are closed

View File

@ -129,7 +129,7 @@ export default {
},
tooltipPosition (e) {
const el = e.target ? e.target : e;
const fromTop = window.pageYOffset + el.getBoundingClientRect().top - (el.offsetHeight / 4);
const fromTop = window.scrollY + el.getBoundingClientRect().top - (el.offsetHeight / 4);
el.querySelector('.ex-tooltip-content').style.top = `${fromTop}px`;
},
getStatusBadge (uid) {

View File

@ -543,9 +543,9 @@ export default {
this.isTesting = false;
},
saveConnection () {
async saveConnection () {
await this.addConnection(this.connection);
this.selectWorkspace(this.connection.uid);
return this.addConnection(this.connection);
},
closeAsking () {
this.isTesting = false;