mirror of
https://github.com/morten-olsen/react-native-debug-console.git
synced 2026-02-08 00:36:26 +01:00
Fix unlisten in events.js (#7)
This commit is contained in:
@@ -8,7 +8,7 @@ class Events {
|
|||||||
}
|
}
|
||||||
|
|
||||||
unlisten(fn) {
|
unlisten(fn) {
|
||||||
this.listeners = this.listeners(l => l !== fn);
|
this.listeners = this.listeners.filter(l => l !== fn);
|
||||||
}
|
}
|
||||||
|
|
||||||
publish(type, data) {
|
publish(type, data) {
|
||||||
@@ -18,4 +18,4 @@ class Events {
|
|||||||
|
|
||||||
const events = new Events();
|
const events = new Events();
|
||||||
|
|
||||||
export default events;
|
export default events;
|
||||||
|
|||||||
Reference in New Issue
Block a user