fix adding root namespace to lookups
parent
10077e207b
commit
20d2eb09cc
|
@ -2,3 +2,7 @@ tests/
|
|||
test/
|
||||
*.test.js
|
||||
testing/
|
||||
examples/
|
||||
*.lock
|
||||
.eslintrc.js
|
||||
.travis.yml
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@uci/base",
|
||||
"version": "0.1.6",
|
||||
"version": "0.1.7",
|
||||
"description": "Multi type and transport JSON packet communication base class. Used in UCI extended classes",
|
||||
"main": "src/base",
|
||||
"scripts": {
|
||||
|
|
|
@ -27,8 +27,8 @@ export default class Base extends EventEmitter {
|
|||
this._defaultCmds = commands
|
||||
this._namespaces = namespaces
|
||||
if (opts.useRootNS) { // add root of instance to checking for command functions - not recommended!
|
||||
this._namespaces.s.push(null)
|
||||
this._namespaces.c.push(null)
|
||||
this._namespaces.s.splice(-1,0,null)
|
||||
this._namespaces.c.splice(-1,0,null)
|
||||
}
|
||||
this.bindFuncs = bindFuncs
|
||||
// predefined sockets:
|
||||
|
@ -217,7 +217,7 @@ export default class Base extends EventEmitter {
|
|||
consumersProcessor(func) {
|
||||
for(let name of Object.keys(this.socket)){
|
||||
if (this.socket[name].type ==='c') {
|
||||
this.socketNamedProcessor(func,name)
|
||||
this.socketNameProcessor(func,name)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
/node_modules/
|
Loading…
Reference in New Issue