When trying to detect mode, it checked that model.exports is defined and assumed that means that require is also defined. However, this is not always the case; some libraries other then require also define module.exports. I added a check to verify require is a function.
When trying to detect mode, it checked that
model.exports
is defined and assumed that means that require is also defined. However, this is not always the case; some libraries other thenrequire
also definemodule.exports
. I added a check to verifyrequire
is a function.