Use proper Change object detection in client

This commit is contained in:
Patrick Mooney 2014-06-24 17:43:25 -05:00
parent 1d2cf79bff
commit ea96468602
1 changed files with 2 additions and 2 deletions

View File

@ -486,11 +486,11 @@ Client.prototype.modify = function modify(name, change, controls, callback) {
});
}
if (change instanceof Change) {
if (Change.isChange(change)) {
changes.push(change);
} else if (Array.isArray(change)) {
change.forEach(function (c) {
if (c instanceof Change) {
if (Change.isChange(c)) {
changes.push(c);
} else {
changeFromObject(c);