Expose platform accessory category to hap-nodejs

Fix an error in plugin config look up
This commit is contained in:
Khaos Tian
2016-04-08 23:50:18 -07:00
parent 620c8473b8
commit 0af8a43dc9
2 changed files with 3 additions and 2 deletions

View File

@@ -466,7 +466,7 @@ Server.prototype._handleNewConfig = function(type, name, replace, config) {
this._config.accessories.push(config);
} else {
var targetName;
if (name.indexOf('.') == -1) {
if (name.indexOf('.') !== -1) {
targetName = name.split(".")[1];
}
var found = false;
@@ -498,7 +498,7 @@ Server.prototype._handleNewConfig = function(type, name, replace, config) {
this._config.platforms.push(config);
} else {
var targetName;
if (name.indexOf('.') == -1) {
if (name.indexOf('.') !== -1) {
targetName = name.split(".")[1];
}