custom module: prevent error when module.exports is not defined
This commit is contained in:
parent
c2e07e6ae0
commit
ddcf186a66
1 changed files with 5 additions and 3 deletions
|
|
@ -132,9 +132,11 @@ class CustomModule {
|
|||
return false
|
||||
}
|
||||
|
||||
this.init = this.module.exports.init || null
|
||||
this.oscInFilter = this.module.exports.oscInFilter || null
|
||||
this.oscOutFilter = this.module.exports.oscOutFilter || null
|
||||
if (typeof this.module.exports === 'object' && this.module.exports !== null) {
|
||||
this.init = this.module.exports.init || null
|
||||
this.oscInFilter = this.module.exports.oscInFilter || null
|
||||
this.oscOutFilter = this.module.exports.oscOutFilter || null
|
||||
}
|
||||
|
||||
return true
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue