Closed jamesgibson14 closed 4 years ago
I can debug it to these lines in createGlobalSandbox
:
const sandbox = {
...srcGlobal,
process: Object.create(srcGlobal.process)
};
before srcGlobal has the .Date
after the spread sandbox does not have the .Date
Okay so I was looking at 0.14.0 and is looks like you have fixed this. Can you publish to Npm?
Yes, that is a strange problem. I have also published a question on SO: https://stackoverflow.com/questions/59009214/some-properties-of-the-global-instance-are-not-copied-by-spread-operator-or-by-o
Just published v0.14.
thanks!
I ran into a package that tries to use the global Date function and fails because it is undefined in the context Package is "tedious" a dependency of "mssql", from it's code:
The second line fails with
TypeError: globalDate is not a constructor
I can debug and there are plenty of global variables but notDate