Ignore windows with no URLs

This commit is contained in:
Kevin Sawicki 2016-08-02 16:14:42 -07:00
parent 016faacf86
commit eaa567dd86

View file

@ -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)