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

This commit is contained in:
Alan Bridgeman 2025-06-24 11:59:15 -05:00
parent 909515c69e
commit 711007a67a

View file

@ -157,8 +157,14 @@ 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);
next(error); if(typeof next !== 'undefined') {
return; next(error);
return;
}
else {
// Because next is undefined and we still want to have Express handle the error we reject the promise
return Promise.reject(error);
}
} }
} }
} }