summary refs log tree commit diff stats
path: root/lib/pure
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pure')
-rw-r--r--lib/pure/events.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pure/events.nim b/lib/pure/events.nim
index 413256657..a3a609b20 100644
--- a/lib/pure/events.nim
+++ b/lib/pure/events.nim
@@ -71,7 +71,7 @@ proc on*(emitter: var TEventEmitter, event: string, func: proc(e: TEventArgs)) =
   ## doesn't exist, it will be created.
   var i = getEventHandler(emitter, event)
   if i < 0:
-    var eh = newEventHandler(event)
+    var eh = initEventHandler(event)
     addHandler(eh, func)
     emitter.s.add(eh)
   else:
@@ -93,4 +93,4 @@ proc emit*(emitter: var TEventEmitter, event: string, args: TEventArgs) =
 proc initEventEmitter*(): TEventEmitter =
   ## Creates and returns a new EventEmitter.
   #new(result)
-  result.s = @[]
\ No newline at end of file
+  result.s = @[]