Skip to content

Commit

Permalink
Fix the incorrect usage of the closure variable 'this' (#17650)
Browse files Browse the repository at this point in the history
* Fix the incorrect usage of the closure variable 'this'
  • Loading branch information
bofeng-song authored Sep 19, 2024
1 parent 38e303e commit 684974d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default class WebSocket {

my.connectSocket({
url,
fail: function fail(res) {
fail: (res) => {
this._triggerEvent('error', res)
}
})
Expand Down Expand Up @@ -113,7 +113,7 @@ export default class WebSocket {
my.sendSocketMessage({
data,
isBuffer,
fail: function (res) {
fail: (res) => {
this._triggerEvent('error', res)
}
});
Expand Down

0 comments on commit 684974d

Please sign in to comment.