Fix: remove try-catch in util.js

This commit is contained in:
eight 2017-09-12 21:28:26 +08:00
parent 23bd3e2cc7
commit a1b8945996

View File

@ -55,6 +55,7 @@ function dirtyReporter() {
} }
function onChange(cb) { function onChange(cb) {
// make sure the callback doesn't throw
onchanges.push(cb); onchanges.push(cb);
} }
@ -67,11 +68,7 @@ function dirtyReporter() {
function emitChange() { function emitChange() {
for (const cb of onchanges) { for (const cb of onchanges) {
try {
cb(); cb();
} catch (e) {
console.error(e);
}
} }
} }