Skip to content

Commit

Permalink
Store#emit: if storage.emit throws an error, log it instead of hiding it
Browse files Browse the repository at this point in the history
Fixes #187
  • Loading branch information
msssk committed Apr 9, 2020
1 parent f6d9a1b commit faaa99b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Store.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,11 @@ define([
event.type = type;
try {
return this.storage.emit(type, event);
} finally {
}
catch (error) {
console.error(error);
}
finally {
// Return the initial value of event.cancelable because a listener error makes it impossible
// to know whether the event was actually canceled
return event.cancelable;
Expand Down

0 comments on commit faaa99b

Please # to comment.