Skip to content

Commit

Permalink
Merge pull request #14 from aivus/fix-res-handling
Browse files Browse the repository at this point in the history
Properly handle a case with missed val array in response
  • Loading branch information
inwaar committed Jan 17, 2023
2 parents 04222db + 20c176e commit b7c55c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,8 @@ class Client extends EventEmitter {
_handleUpdateConfirmResponse(pack) {
let updatedProperties = {};
pack.opt.forEach((opt, i) => {
updatedProperties[opt] = pack.val[i];
this._properties[opt] = pack.val[i];
const value = 'val' in pack ? pack.val : pack.p;
this._properties[opt] = updatedProperties[opt] = value[i];
});

this.emit(
Expand Down

0 comments on commit b7c55c7

Please sign in to comment.