|
|
@ -141,7 +141,7 @@ exports.Client = Client; |
|
|
|
|
|
|
|
Client.prototype._addHandle = function(desc) { |
|
|
|
if (typeof desc != 'object' || typeof desc.handle != 'number') { |
|
|
|
throw new Error('bad type'); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
this.handles[desc.handle] = desc; |
|
|
@ -428,7 +428,13 @@ Client.prototype.mirrorObject = function(handle, cb) { |
|
|
|
|
|
|
|
for (var i = 0; i < handle.properties.length; i++) { |
|
|
|
var value = res.body[handle.properties[i].ref]; |
|
|
|
var mirrorValue = value.value ? value.value : value.text; |
|
|
|
var mirrorValue; |
|
|
|
if (value) { |
|
|
|
mirrorValue = value.value ? value.value : value.text; |
|
|
|
} else { |
|
|
|
mirrorValue = '[?]'; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (Array.isArray(mirror) && |
|
|
|
typeof handle.properties[i].name != 'number') { |
|
|
|