Skip to content

Commit

Permalink
Fix dictionary move to index
Browse files Browse the repository at this point in the history
lint
  • Loading branch information
jbukl committed Jan 8, 2024
1 parent 60276d4 commit fc83f31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ext/js/pages/settings/dictionary-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -716,8 +716,8 @@ export class DictionaryController {
/** */
_onDictionaryMoveButtonClick() {
const modal = /** @type {import('./modal.js').Modal} */ (this._modalController.getModal('dictionary-move-location'));
const {index} = modal.node.dataset;
if (typeof index !== 'number') { return; }
const index = modal.node.dataset.index ?? '';
if (isNaN(+index)) { return; }
const indexNumber = Number.parseInt(index, 10);

/** @type {HTMLInputElement} */
Expand Down

0 comments on commit fc83f31

Please sign in to comment.