Remove error type from error message (#958)

This commit is contained in:
toasted-nutbread 2020-10-26 21:54:18 -04:00 committed by GitHub
parent 28330d0e30
commit 9048890bf6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;