Skip to content

Commit

Permalink
Fix resolve and pass through data
Browse files Browse the repository at this point in the history
  • Loading branch information
Apollon77 committed Sep 27, 2024
1 parent 8fc57a0 commit 8c7f614
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 18 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -427,9 +427,9 @@ class TuyaDevice extends EventEmitter {
}
});
if (options.shouldWaitForResponse) {
this._setResolver = () => {
this._setResolver = (data) => {
if (!resolvedOrRejected) {
resolve();
resolve(data);
}
};

Expand Down
32 changes: 17 additions & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
},
"homepage": "https://github.com/codetheweb/tuyapi#readme",
"dependencies": {
"debug": "^4.3.6",
"debug": "^4.3.7",
"p-queue": "6.6.2",
"p-retry": "4.6.2",
"p-timeout": "3.2.0"
Expand Down

0 comments on commit 8c7f614

Please sign in to comment.