Forgot to change code in second spot (this is why DRY principal exists etc...)
All checks were successful
Publish to Private NPM Registry / publish (push) Successful in 43s
All checks were successful
Publish to Private NPM Registry / publish (push) Successful in 43s
This commit is contained in:
parent
909515c69e
commit
711007a67a
1 changed files with 8 additions and 2 deletions
|
|
@ -157,9 +157,15 @@ export function Page(title: string, page: string, extraScripts: (string | { scri
|
||||||
}
|
}
|
||||||
catch(error) {
|
catch(error) {
|
||||||
console.error('[Page Decorator] Error:', error);
|
console.error('[Page Decorator] Error:', error);
|
||||||
|
if(typeof next !== 'undefined') {
|
||||||
next(error);
|
next(error);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
// Because next is undefined and we still want to have Express handle the error we reject the promise
|
||||||
|
return Promise.reject(error);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue