Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug]After upgrading to 0.5.1, NVM is exported by default, but native.js is imported by default in NVM, which causes the standard Date and Math objects to be replaced, and reports that 'Blockchain.block' is not defined. #51

Open
xiwangzishi opened this issue Jun 15, 2018 · 2 comments

Comments

@xiwangzishi
Copy link

升级到 0.5.1 后,默认导出了 NVM。index.js 第 8 行

var NVM = require('./lib/nvm/nvm');

但是 NVM 里面默认引入了 native.js 。nvm.js 第 4 行

var native = require("./native");

native.js 会导致在浏览器环境下标准 Date 和 Math 对象被替换

而且会报 'Blockchain.block' is not defined.(因为Date对象依赖 Blockchain.block,而浏览器环境没有这个)

建议默认不要导出 NVM

@yupnano
Copy link
Contributor

yupnano commented Jun 15, 2018

谢谢反馈,稍后我们会确认并修复该问题。

@yupnano
Copy link
Contributor

yupnano commented Jun 15, 2018

问题已经修复了,请更新一下~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants