diff --git a/renderer/lib/location-history.js b/renderer/lib/location-history.js index c57cc82f..96efdf0b 100644 --- a/renderer/lib/location-history.js +++ b/renderer/lib/location-history.js @@ -20,7 +20,10 @@ LocationHistory.prototype._go = function (page, cb) { page.onbeforeload((err) => { if (this._pending !== page) return /* navigation was cancelled */ this._pending = null - if (err) return cb(err) + if (err) { + if (cb) cb(err) + return + } this._history.push(page) if (cb) cb() })