Skip to content

Commit

Permalink
local-store - allow lastError through unchanged if error-like
Browse files Browse the repository at this point in the history
  • Loading branch information
kumavis committed Sep 23, 2019
1 parent f6e4b54 commit ab4be0f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/scripts/lib/local-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,8 @@ function isEmpty (obj) {
function checkForError () {
const lastError = extension.runtime.lastError
if (!lastError) return
// if it quacks like an Error, its an Error
if (lastError.stack && lastError.message) return lastError
// repair incomplete error object (eg chromium v77)
return new Error(lastError.message)
}

0 comments on commit ab4be0f

Please sign in to comment.