keyz / identity-obj-proxy

An identity object using ES6 proxies. Useful for mocking webpack imports like CSS Modules.
MIT License
496 stars 18 forks source link

Assumes process implies process.versions.node #16

Open dobesv opened 2 years ago

dobesv commented 2 years ago

We are simulating process in the browser using https://github.com/defunctzombie/node-process/blob/master/browser.js . It doesn't have process.versions.node in it, so this check over here gives an error: https://github.com/keyz/identity-obj-proxy/blob/master/src/index.js#L10

It would be nice if the code were updated to handle the case where process.versions.node is set even if process is not.