sasaplus1 / deepcopy.js

deep copy data

Home Page:https://sasaplus1.github.io/deepcopy.js/benchmark

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeError: Cannot set property console of #<Object> which has only a getter

Glench opened this issue · comments

This is probably a silly thing to do, but perhaps there should be an option for skipping things that cause this particular error.

In node 8.7.0, the code:

deepcopy(global)

produces:

TypeError: Cannot set property console of # which has only a getter
at recursiveCopy (/Users/glen/code/REPLugger/node_modules/deepcopy/lib/index.js:86:16)
at deepcopy (/Users/glen/code/REPLugger/node_modules/deepcopy/lib/index.js:35:10)
at repl:1:1
at ContextifyScript.Script.runInThisContext (vm.js:50:33)
at REPLServer.defaultEval (repl.js:239:29)
at bound (domain.js:301:14)
at REPLServer.runBound [as eval] (domain.js:314:12)
at REPLServer.onLine (repl.js:440:10)
at emitOne (events.js:120:20)
at REPLServer.emit (events.js:210:7)

I changed to shallow copy from when ver.1.0.0.