diff options
Diffstat (limited to 'ext/js/pages/settings/permissions-origin-controller.js')
-rw-r--r-- | ext/js/pages/settings/permissions-origin-controller.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/js/pages/settings/permissions-origin-controller.js b/ext/js/pages/settings/permissions-origin-controller.js index 3a9db602..73f06a56 100644 --- a/ext/js/pages/settings/permissions-origin-controller.js +++ b/ext/js/pages/settings/permissions-origin-controller.js @@ -17,6 +17,7 @@ */ import {EventListenerCollection} from '../../core.js'; +import {toError} from '../../core/to-error.js'; import {querySelectorNotNull} from '../../dom/query-selector.js'; export class PermissionsOriginController { @@ -155,7 +156,7 @@ export class PermissionsOriginController { } catch (e) { const errorContainer = /** @type {HTMLElement} */ (this._errorContainer); errorContainer.hidden = false; - errorContainer.textContent = e instanceof Error ? e.message : `${e}`; + errorContainer.textContent = toError(e).message; } if (!added) { return false; } await this._updatePermissions(); |