Skip to content

Commit

Permalink
log only on errors that aren't disconnected anki
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanVukovic99 committed Apr 19, 2024
1 parent 69b57e5 commit 1f721eb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ext/js/display/display-anki.js
Original file line number Diff line number Diff line change
Expand Up @@ -413,9 +413,6 @@ export class DisplayAnki {
if (button !== null) {
button.disabled = !canAdd;
button.hidden = (ankiError !== null);
if (ankiError) {
log.error(ankiError);
}

// If entry has noteIds, show the "add duplicate" button.
if (Array.isArray(noteIds) && noteIds.length > 0) {
Expand Down Expand Up @@ -692,6 +689,9 @@ export class DisplayAnki {
} catch (e) {
infos = this._getAnkiNoteInfoForceValue(notes, false);
ankiError = toError(e);
if (ankiError.message !== 'Anki not connected') {
log.error(e);
}
}

/** @type {import('display-anki').DictionaryEntryDetails[]} */
Expand Down

0 comments on commit 1f721eb

Please sign in to comment.