mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-21 22:19:41 +01:00
ev: Cannot read property 'push' of undefined
This commit is contained in:
@@ -5,7 +5,7 @@ class EventManager {
|
||||
|
||||
subscribe(name, handler) {
|
||||
if (!name || !handler) throw new Error("name and handler are required.");
|
||||
if (!this._registry[name]) this._registry.name = [];
|
||||
if (!this._registry[name]) this._registry[name] = [];
|
||||
this._registry[name].push(handler);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user