Ignore windows with no URLs
This commit is contained in:
parent
016faacf86
commit
eaa567dd86
1 changed files with 4 additions and 1 deletions
|
@ -86,7 +86,10 @@ const patchBrowserWindow = () => {
|
||||||
|
|
||||||
const {destroy} = BrowserWindow.prototype
|
const {destroy} = BrowserWindow.prototype
|
||||||
BrowserWindow.prototype.destroy = function () {
|
BrowserWindow.prototype.destroy = function () {
|
||||||
if (this.isDestroyed()) return destroy.call(this)
|
if (this.isDestroyed() || !this.getURL()) {
|
||||||
|
return destroy.call(this)
|
||||||
|
}
|
||||||
|
|
||||||
getCoverageFromWebContents(this.webContents, (coverage, pid) => {
|
getCoverageFromWebContents(this.webContents, (coverage, pid) => {
|
||||||
saveCoverageData(coverage, pid)
|
saveCoverageData(coverage, pid)
|
||||||
destroy.call(this)
|
destroy.call(this)
|
||||||
|
|
Loading…
Reference in a new issue