From 9d919187a59e5215cef85f7058580ea91ecc5953 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Thu, 19 Nov 2020 16:57:45 +0300 Subject: [PATCH] reverted to old code -- though functionally identical, the new version does not affect object display in chrome (both do not work in FF)... Signed-off-by: Alex A. Naanou --- object.js | 8 +++++--- package.json | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/object.js b/object.js index 0dbe55b..b644022 100755 --- a/object.js +++ b/object.js @@ -890,8 +890,11 @@ function Constructor(name, a, b, c){ && obj.__init__(...arguments) return obj } - Object.defineProperty(_constructor, 'name', { value: name }) - /*/ XXX is this still needed??? + // XXX this changes the name but does not seem to affect the displayed + // doc in chrome... + // FF does not seem to be affected by either version of code... + //Object.defineProperty(_constructor, 'name', { value: name }) + _constructor.name = name // just in case the browser/node refuses to change the name, we'll make // it a different offer ;) _constructor.name == 'Constructor' @@ -901,7 +904,6 @@ function Constructor(name, a, b, c){ && eval('_constructor = '+ _constructor .toString() .replace(/Constructor/g, name)) - //*/ // set .toString(..)... // NOTE: do this only if .toString(..) is not defined by user... // XXX revise this test... diff --git a/package.json b/package.json index daa984e..a6436f6 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ig-object", - "version": "5.4.6", + "version": "5.4.7", "description": "", "main": "object.js", "scripts": {