fix: add missing index arg in navigationHistory.canGoToOffset (#44989)

fix: add missing arg
This commit is contained in:
Alice Zhao 2024-12-12 07:56:27 -08:00 committed by GitHub
parent 6961e9458a
commit a5b4339884
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View file

@ -514,9 +514,9 @@ WebContents.prototype.canGoForward = function () {
};
const canGoToOffsetDeprecated = deprecate.warnOnce('webContents.canGoToOffset', 'webContents.navigationHistory.canGoToOffset');
WebContents.prototype.canGoToOffset = function () {
WebContents.prototype.canGoToOffset = function (index: number) {
canGoToOffsetDeprecated();
return this._canGoToOffset();
return this._canGoToOffset(index);
};
const clearHistoryDeprecated = deprecate.warnOnce('webContents.clearHistory', 'webContents.navigationHistory.clear');