Skip to content

Commit

Permalink
Merge pull request #666 from codetheweb/fix-resolve
Browse files Browse the repository at this point in the history
Fix resolve and pass through data
  • Loading branch information
Apollon77 authored Sep 27, 2024
2 parents 8fc57a0 + 8c7f614 commit c8b3563
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 c8b3563

Please sign in to comment.