larasopp 1.2.14 → 1.2.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/Listener.js CHANGED
@@ -44,9 +44,9 @@ class Listener {
44
44
  if (withCache && this.hasCache(event))
45
45
  callback(this.getCache(event));
46
46
  const listener = this.context.events.addListener(this.channel + ':' + event, (data) => {
47
- const result = callback(data);
47
+ callback(data);
48
48
  if (withCache)
49
- this.pushCache(event, result);
49
+ this.pushCache(event, data);
50
50
  });
51
51
  this.listeners.push(listener);
52
52
  return this;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "larasopp",
3
- "version": "1.2.14",
3
+ "version": "1.2.15",
4
4
  "description": "Websocket client for laravel",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
package/src/Listener.ts CHANGED
@@ -29,8 +29,8 @@ class Listener implements EventListener {
29
29
 
30
30
  if (withCache && this.hasCache(event)) callback(this.getCache(event));
31
31
  const listener = this.context.events.addListener(this.channel + ':' + event, (data) => {
32
- const result = callback(data);
33
- if (withCache) this.pushCache(event, result);
32
+ callback(data);
33
+ if (withCache) this.pushCache(event, data);
34
34
  });
35
35
  this.listeners.push(listener);
36
36
  return this;