SyntaxError: In strict mode code, functions can only be declared at top level or immediately within another function.
Here is the offending code:
function timerFunc() {
if (wasCallbackCalled) {
return;
}
wasCallbackCalled = true;
return callback(null, cached.item, cached, report);
}
Strict mode complains because ECMA standards specify that function declarations are not valid within blocks and timerFunc is being declared within another functions block.
Let me know if you need any other help/assistance with getting this fixed.
This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.
Thanks for building a really cool package. We're building an app with Hapi and we've decided to 'use strict' everywhere.
When doing this, I came across an issue/bug when strict mode is enabled globally which includes our hapi modules:
node_modules/hapi/node_modules/catbox/lib/policy.js:146
SyntaxError: In strict mode code, functions can only be declared at top level or immediately within another function.
Here is the offending code:
Strict mode complains because ECMA standards specify that function declarations are not valid within blocks and timerFunc is being declared within another functions block.
Let me know if you need any other help/assistance with getting this fixed.