ig-types 6.16.1 → 6.16.2
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/event.js +6 -4
- package/package.json +1 -1
package/event.js
CHANGED
|
@@ -116,7 +116,8 @@ object.Constructor('Eventful', {
|
|
|
116
116
|
this.handlerLocation == 'method' ?
|
|
117
117
|
(this.__event_handlers__ = this.__event_handlers__ || [])
|
|
118
118
|
// context (default)...
|
|
119
|
-
|
|
119
|
+
//: (context.__event_handlers__ == null ?
|
|
120
|
+
: !context.hasOwnProperty('__event_handlers__') ?
|
|
120
121
|
Object.defineProperty(context, '__event_handlers__', {
|
|
121
122
|
value: {[this.name]: (handlers = [])},
|
|
122
123
|
enumerable: false,
|
|
@@ -124,8 +125,8 @@ object.Constructor('Eventful', {
|
|
|
124
125
|
writable: true,
|
|
125
126
|
})
|
|
126
127
|
&& handlers
|
|
127
|
-
|
|
128
|
-
|
|
128
|
+
: (context.__event_handlers__[this.name] =
|
|
129
|
+
context.__event_handlers__[this.name] || [])
|
|
129
130
|
// add handler...
|
|
130
131
|
handlers.push(handler)
|
|
131
132
|
return this },
|
|
@@ -291,7 +292,8 @@ module.EventHandlerMixin = object.Mixin('EventHandlerMixin', {
|
|
|
291
292
|
this[evt].bind(this, func)
|
|
292
293
|
// non-event...
|
|
293
294
|
} else {
|
|
294
|
-
this.__event_handlers__ == null
|
|
295
|
+
//this.__event_handlers__ == null
|
|
296
|
+
!this.hasOwnProperty('__event_handlers__')
|
|
295
297
|
&& Object.defineProperty(this, '__event_handlers__', {
|
|
296
298
|
value: {},
|
|
297
299
|
enumerable: false,
|