This commit is contained in:
nous- 2018-03-15 07:29:32 +03:00 коммит произвёл Samuel Attard
Родитель 9aeb61181a
Коммит f54c94d6c9
1 изменённых файлов: 6 добавлений и 5 удалений

Просмотреть файл

@ -21,11 +21,6 @@ var NavigationController = (function () {
this.webContents = webContents
this.clearHistory()
// webContents may have already navigated to a page.
if (this.webContents._getURL()) {
this.currentIndex++
this.history.push(this.webContents._getURL())
}
this.webContents.on('navigation-entry-commited', (event, url, inPage, replaceEntry) => {
if (this.inPageIndex > -1 && !inPage) {
// Navigated to a new page, clear in-page mark.
@ -106,6 +101,12 @@ var NavigationController = (function () {
this.currentIndex = -1
this.pendingIndex = -1
this.inPageIndex = -1
// webContents may have already navigated to a page.
if (this.webContents._getURL()) {
this.currentIndex++
this.history.push(this.webContents._getURL())
}
}
NavigationController.prototype.goBack = function () {