NathanaelA / nativescript-websockets

Websockets for NativeScript
83 stars 43 forks source link

Update websockets-base.ios.js #106

Closed sulymkaa closed 2 years ago

sulymkaa commented 2 years ago

fix callback "undefined" value https://github.com/NathanaelA/nativescript-websockets/issues/99

NathanaelA commented 2 years ago
  1. Hmm, exactly how does passing this as an array fix #99?
  2. In the event this does fix #99, does it break all the other flavors?
  3. Shouldn't this be applied to all three websocket-base.xxxx.js files?
sulymkaa commented 2 years ago
  1. apply function expects to have context and array of arguments and after this change I was able to get event.data in "message" event listener instead of undefined as event value
  2. haven't checked
  3. yes, it definitely should be applied to all files of this kind
phenric commented 2 years ago

Hi, I had the same issue with Android and iOS. As @sulymkaa did, I've created a PR (https://github.com/NathanaelA/nativescript-websockets/pull/107) to fix the Android one.

NathanaelA commented 2 years ago

I've updated with this PR, & #107 and applied the same fix to the third file. Published another version of @master.technology/websockets