Commit 40663128 authored by SpinShare's avatar SpinShare

added failsafe to windowtitlebar

parent 60967ae5
...@@ -26,7 +26,9 @@ ...@@ -26,7 +26,9 @@
}, },
mounted: function() { mounted: function() {
this.$data.system = process.platform; this.$data.system = process.platform;
this.$data.isMaximized = remote.BrowserWindow.getFocusedWindow().isMaximized(); if(remote.BrowserWindow.getFocusedWindow()) {
this.$data.isMaximized = remote.BrowserWindow.getFocusedWindow().isMaximized();
}
}, },
methods: { methods: {
NavigateBack: function() { NavigateBack: function() {
...@@ -43,7 +45,9 @@ ...@@ -43,7 +45,9 @@
remote.BrowserWindow.getFocusedWindow().maximize(); remote.BrowserWindow.getFocusedWindow().maximize();
} }
this.$data.isMaximized = remote.BrowserWindow.getFocusedWindow().isMaximized(); if(remote.BrowserWindow.getFocusedWindow()) {
this.$data.isMaximized = remote.BrowserWindow.getFocusedWindow().isMaximized();
}
}, },
WindowClose: function() { WindowClose: function() {
remote.BrowserWindow.getFocusedWindow().close(); remote.BrowserWindow.getFocusedWindow().close();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment