mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-03 14:59:18 +02:00
commit
e2f90b3526
1 changed files with 5 additions and 1 deletions
|
@ -53,7 +53,11 @@ class Hook {
|
||||||
var promises = [];
|
var promises = [];
|
||||||
|
|
||||||
this.hooks.forEach(function(task) {
|
this.hooks.forEach(function(task) {
|
||||||
var executing = task.apply(context, args);
|
try {
|
||||||
|
var executing = task.apply(context, args);
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err);
|
||||||
|
}
|
||||||
|
|
||||||
if(executing && typeof executing["then"] === "function") {
|
if(executing && typeof executing["then"] === "function") {
|
||||||
// Task is a function that returns a promise
|
// Task is a function that returns a promise
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue