nebulasio / neb.js

GNU Lesser General Public License v3.0
83 stars 46 forks source link

[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 6 years ago

xiwangzishi commented 6 years ago

升级到 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 commented 6 years ago

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

yupnano commented 6 years ago

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