diff --git a/src/core.js b/src/core.js index e1330e7..0a136b7 100644 --- a/src/core.js +++ b/src/core.js @@ -36,7 +36,9 @@ var CryptoJS = CryptoJS || (function (Math, undefined) { if (!crypto && typeof require === 'function') { try { crypto = require('crypto'); - } catch (err) {} + } catch (err) { + crypto = global.crypto; + } } /*