File tree Expand file tree Collapse file tree 1 file changed +6
-12
lines changed Expand file tree Collapse file tree 1 file changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -101,14 +101,12 @@ class Observable extends Base {
101101 }
102102
103103 if ( ! nameObject ) {
104- eventConfig = {
105- data,
106- delay,
107- fn : listener ,
108- id : eventId || Neo . getId ( 'event' ) ,
109- once,
110- scope
111- } ;
104+ eventConfig = { fn : listener , id : eventId || Neo . getId ( 'event' ) } ;
105+
106+ if ( data ) { eventConfig . data = data }
107+ if ( delay > 0 ) { eventConfig . delay = delay }
108+ if ( once ) { eventConfig . once = once }
109+ if ( scope ) { eventConfig . scope = scope }
112110
113111 if ( existing = me . listeners ?. [ name ] ) {
114112 existing . forEach ( cfg => {
@@ -194,10 +192,6 @@ class Observable extends Base {
194192 // look in the ownership hierarchy from me.
195193 const cb = resolveCallback ( handler . fn , handler . scope || me ) ;
196194
197- if ( Neo . isString ( cb . fn ) ) {
198- console . log ( name , handler , cb ) ;
199- }
200-
201195 // remove the listener if the scope no longer exists
202196 if ( cb . scope && ! cb . scope . id ) {
203197 NeoArray . remove ( listeners [ name ] , handler )
You can’t perform that action at this time.
0 commit comments