summaryrefslogtreecommitdiff
path: root/ext/mixed/js/display.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/mixed/js/display.js')
-rw-r--r--ext/mixed/js/display.js12
1 files changed, 5 insertions, 7 deletions
diff --git a/ext/mixed/js/display.js b/ext/mixed/js/display.js
index c0102379..f79ba303 100644
--- a/ext/mixed/js/display.js
+++ b/ext/mixed/js/display.js
@@ -466,7 +466,7 @@ class Display extends EventDispatcher {
this._closePopups();
this._setEventListenersActive(false);
- let asigned = false;
+ let assigned = false;
const eventArgs = {type, urlSearchParams, token};
this._historyHasChanged = true;
this._contentType = type;
@@ -476,7 +476,7 @@ class Display extends EventDispatcher {
case 'kanji':
{
const isTerms = (type === 'terms');
- asigned = await this._setContentTermsOrKanji(token, isTerms, urlSearchParams, eventArgs);
+ assigned = await this._setContentTermsOrKanji(token, isTerms, urlSearchParams, eventArgs);
}
break;
case 'unloaded':
@@ -485,14 +485,14 @@ class Display extends EventDispatcher {
eventArgs.content = content;
this.trigger('contentUpdating', eventArgs);
this._setContentExtensionUnloaded();
- asigned = true;
+ assigned = true;
}
break;
}
const stale = (this._setContentToken !== token);
if (!stale) {
- if (!asigned) {
+ if (!assigned) {
type = 'clear';
this._contentType = type;
const {content} = this._history;
@@ -910,9 +910,7 @@ class Display extends EventDispatcher {
container.appendChild(entry);
}
- if (typeof focusEntry === 'number') {
- this._focusEntry(focusEntry, false);
- }
+ this._focusEntry(typeof focusEntry === 'number' ? focusEntry : 0, false);
if (typeof scrollX === 'number' || typeof scrollY === 'number') {
let {x, y} = this._windowScroll;
if (typeof scrollX === 'number') { x = scrollX; }