Skip to content

Commit

Permalink
Allow flagsIndicatorIcon to be null
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuuuube committed Nov 6, 2024
1 parent 78958de commit 3751752
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ext/js/display/display-anki.js
Original file line number Diff line number Diff line change
Expand Up @@ -560,8 +560,8 @@ export class DisplayAnki {
flagsIndicator.disabled = false;
flagsIndicator.hidden = false;
flagsIndicator.title = `Card flags: ${[...displayFlags].join(', ')}`;
/** @type {HTMLElement} */
const flagsIndicatorIcon = querySelectorNotNull(flagsIndicator, '.action-icon');
/** @type {HTMLElement | null} */
const flagsIndicatorIcon = flagsIndicator.querySelector('.action-icon');
if (flagsIndicatorIcon !== null && flagsIndicator instanceof HTMLElement) {
flagsIndicatorIcon.style.background = this._getFlagColor(displayFlags);
}
Expand Down

0 comments on commit 3751752

Please sign in to comment.