diff --git a/shim.js b/shim.js index 5f28b72..6e7f184 100644 --- a/shim.js +++ b/shim.js @@ -34,7 +34,8 @@ if (require('./package.json').dependencies['react-native-crypto']) { let crypto if (typeof window === 'object') { - crypto = window.crypto = window.crypto || {} + if (!window.crypto) window.crypto = {} + crypto = window.crypto } else { crypto = require('crypto') }