mirror of
https://github.com/electron/electron.git
synced 2026-01-26 15:58:07 -05:00
Ignore windows with no URLs
This commit is contained in:
@@ -86,7 +86,10 @@ const patchBrowserWindow = () => {
|
||||
|
||||
const {destroy} = BrowserWindow.prototype
|
||||
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) => {
|
||||
saveCoverageData(coverage, pid)
|
||||
destroy.call(this)
|
||||
|
||||
Reference in New Issue
Block a user