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 <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2020-11-19 16:57:45 +03:00
parent 339dc14c9f
commit 9d919187a5
2 changed files with 6 additions and 4 deletions

View File

@ -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...

View File

@ -1,6 +1,6 @@
{
"name": "ig-object",
"version": "5.4.6",
"version": "5.4.7",
"description": "",
"main": "object.js",
"scripts": {