mirror of
https://github.com/flynx/types.js.git
synced 2025-12-19 18:01:39 +00:00
another bugfix......
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
0d22e84856
commit
5155c09661
10
event.js
10
event.js
@ -116,7 +116,8 @@ object.Constructor('Eventful', {
|
||||
this.handlerLocation == 'method' ?
|
||||
(this.__event_handlers__ = this.__event_handlers__ || [])
|
||||
// context (default)...
|
||||
: (context.__event_handlers__ == null ?
|
||||
//: (context.__event_handlers__ == null ?
|
||||
: !context.hasOwnProperty('__event_handlers__') ?
|
||||
Object.defineProperty(context, '__event_handlers__', {
|
||||
value: {[this.name]: (handlers = [])},
|
||||
enumerable: false,
|
||||
@ -124,8 +125,8 @@ object.Constructor('Eventful', {
|
||||
writable: true,
|
||||
})
|
||||
&& handlers
|
||||
: (context.__event_handlers__[this.name] =
|
||||
context.__event_handlers__[this.name] || []))
|
||||
: (context.__event_handlers__[this.name] =
|
||||
context.__event_handlers__[this.name] || [])
|
||||
// add handler...
|
||||
handlers.push(handler)
|
||||
return this },
|
||||
@ -291,7 +292,8 @@ module.EventHandlerMixin = object.Mixin('EventHandlerMixin', {
|
||||
this[evt].bind(this, func)
|
||||
// non-event...
|
||||
} else {
|
||||
this.__event_handlers__ == null
|
||||
//this.__event_handlers__ == null
|
||||
!this.hasOwnProperty('__event_handlers__')
|
||||
&& Object.defineProperty(this, '__event_handlers__', {
|
||||
value: {},
|
||||
enumerable: false,
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ig-types",
|
||||
"version": "6.16.1",
|
||||
"version": "6.16.2",
|
||||
"description": "Generic JavaScript types and type extensions...",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user