Skip to content

Commit

Permalink
Do not stop twice
Browse files Browse the repository at this point in the history
  • Loading branch information
kapouer committed Sep 24, 2021
1 parent 56111fa commit e139318
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/webkitgtk.js
Original file line number Diff line number Diff line change
Expand Up @@ -266,9 +266,13 @@ class WebKit extends EventEmitter {
debug("stop done", wasLoading);
pcb.cb(null, wasLoading);
}.bind(this);
this.readyState = "stop";
wasLoading = this.webview && this.webview.stop && this.webview.stop(fincb);
debug("was loading", wasLoading);
if (this.readyState != "stop") {
this.readyState = "stop";
wasLoading = this.webview && this.webview.stop && this.webview.stop(fincb);
debug("was loading", wasLoading);
} else {
debug("was already stopped");
}
return pcb.ret;
}

Expand Down

0 comments on commit e139318

Please sign in to comment.