diff --git a/js/embark.js b/js/embark.js index 912ab4157..1d2fec12f 100644 --- a/js/embark.js +++ b/js/embark.js @@ -1,4 +1,6 @@ -var EmbarkJS = {}; +var EmbarkJS = { + onReady: __embarkContext.execWhenReady +}; EmbarkJS.isNewWeb3 = function() { var _web3 = new Web3(); diff --git a/templates/demo/app/dapp.js b/templates/demo/app/dapp.js index 5c5f121aa..a598da263 100644 --- a/templates/demo/app/dapp.js +++ b/templates/demo/app/dapp.js @@ -21,7 +21,7 @@ class App extends React.Component { } componentDidMount(){ - __embarkContext.execWhenReady(() => { + EmbarkJS.onReady(() => { if (EmbarkJS.isNewWeb3()) { EmbarkJS.Messages.Providers.whisper.getWhisperVersion((err, version) => { if(!err)