mirror of
https://github.com/flynx/object.js.git
synced 2025-10-29 10:30:08 +00:00
bugfix...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
acb4254f6a
commit
7e6d4f3188
@ -536,10 +536,13 @@ function(context, constructor, ...args){
|
|||||||
: constructor.prototype.__call__
|
: constructor.prototype.__call__
|
||||||
.call(obj, this, ...arguments)) },
|
.call(obj, this, ...arguments)) },
|
||||||
constructor)
|
constructor)
|
||||||
|
// recursively call .__rawinstance__(..)
|
||||||
|
: constructor.__proto__.__rawinstance__ ?
|
||||||
|
constructor.__proto__.__rawinstance__(context, ...args)
|
||||||
// use parent's constructor...
|
// use parent's constructor...
|
||||||
: (typeof(constructor.__proto__) == 'function'
|
: (typeof(constructor.__proto__) == 'function'
|
||||||
&& constructor.__proto__ !== (function(){}).__proto__) ?
|
&& constructor.__proto__ !== (function(){}).__proto__) ?
|
||||||
Reflect.construct(constructor.__proto__, [], constructor)
|
Reflect.construct(constructor.__proto__, args, constructor)
|
||||||
// default object base...
|
// default object base...
|
||||||
: Reflect.construct(Object, [], constructor)
|
: Reflect.construct(Object, [], constructor)
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ig-object",
|
"name": "ig-object",
|
||||||
"version": "4.0.1",
|
"version": "4.0.2",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "object.js",
|
"main": "object.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user