summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-10-26 21:54:18 -0400
committerGitHub <noreply@github.com>2020-10-26 21:54:18 -0400
commit9048890bf614a9c0313c2d27da044193332f1881 (patch)
treea2e00e76f35bbefe1647b6e6b95cd937c86627ee /ext
parent28330d0e300556ea9890b067ce8ff56510faf478 (diff)
Remove error type from error message (#958)
Diffstat (limited to 'ext')
-rw-r--r--ext/bg/js/settings/anki-controller.js3
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;