diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2020-10-26 21:54:18 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-26 21:54:18 -0400 |
commit | 9048890bf614a9c0313c2d27da044193332f1881 (patch) | |
tree | a2e00e76f35bbefe1647b6e6b95cd937c86627ee /ext/bg | |
parent | 28330d0e300556ea9890b067ce8ff56510faf478 (diff) |
Remove error type from error message (#958)
Diffstat (limited to 'ext/bg')
-rw-r--r-- | ext/bg/js/settings/anki-controller.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/bg/js/settings/anki-controller.js b/ext/bg/js/settings/anki-controller.js index f3640e3c..6988e4b8 100644 --- a/ext/bg/js/settings/anki-controller.js +++ b/ext/bg/js/settings/anki-controller.js @@ -287,7 +287,8 @@ class AnkiController { } _showAnkiError(error) { - const errorString = `${error}`; + let errorString = typeof error === 'object' && error !== null ? error.message : null; + if (!errorString) { errorString = `${error}`; } this._ankiErrorMessageContainer.textContent = errorString; const data = error.data; |