From a8958d255d0a997a40aa156d3f34d9689378a95e Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Mon, 27 Apr 2020 01:36:59 +0300 Subject: [PATCH] bugfix... Signed-off-by: Alex A. Naanou --- README.md | 2 +- object.js | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index cf40ed9..4ec2c7c 100755 --- a/README.md +++ b/README.md @@ -99,7 +99,7 @@ var Item = object.Constructor('Item', { __init__: function(){ // call the "super" method... - object.parent(this.__init__, this).call(this) + object.parentCall(this.__init__, this) this.item_attr = 'instance attribute value' }, diff --git a/object.js b/object.js index 17ea9d2..9d7bd72 100755 --- a/object.js +++ b/object.js @@ -131,7 +131,7 @@ module.parentCall = function(method, name, that, ...args){ return typeof(name) == typeof('str') ? parent(method, name, that).call(that, ...args) - : parent(method, that).call(that, ...args) } + : parent(method, name).call(name, ...[that, ...args]) } diff --git a/package.json b/package.json index cbaef68..891e640 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ig-object", - "version": "2.4.1", + "version": "2.4.2", "description": "", "main": "object.js", "scripts": {