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 +2 -2
- package/package.json +1 -1
- package/src/Listener.ts +2 -2
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
|
-
|
|
47
|
+
callback(data);
|
|
48
48
|
if (withCache)
|
|
49
|
-
this.pushCache(event,
|
|
49
|
+
this.pushCache(event, data);
|
|
50
50
|
});
|
|
51
51
|
this.listeners.push(listener);
|
|
52
52
|
return this;
|
package/package.json
CHANGED
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
|
-
|
|
33
|
-
if (withCache) this.pushCache(event,
|
|
32
|
+
callback(data);
|
|
33
|
+
if (withCache) this.pushCache(event, data);
|
|
34
34
|
});
|
|
35
35
|
this.listeners.push(listener);
|
|
36
36
|
return this;
|