mirror of
https://github.com/status-im/realm-js.git
synced 2025-02-10 05:37:08 +00:00
Electron is a combination of a node and Chromium processes. Chromium processes can have node bindings enabled and can therefore run most npm modules seamlessly. The current `lib/index.js` bootstrapping logic results in a ReferenceError on the following statement: typeof Realm != 'undefined' Thus, checking whether running under node first allows realm-js to run inside the Electron renderer (Chromium) process.