diff --git a/browser/layout/partials/ctm.html b/browser/layout/partials/ctm.html index 7ddd90887..ded4efad5 100644 --- a/browser/layout/partials/ctm.html +++ b/browser/layout/partials/ctm.html @@ -3,10 +3,9 @@ classes = classes.replace(/\bno-js\b/, 'js'); {{!note: needed for JS that's run out of the scope of the bootstrap (inline onclicks, etc)}} var getRandomValuesAvailable; -try { - getRandomValuesAvailable = 'getRandomValues' in window.crypto -} catch (e) { - getRandomValuesAvailable = 'getRandomValues' in window.msCrypto +var cryptoApi = window.crypto || window.msCrypto; +if (cryptoApi) { + getRandomValuesAvailable = 'getRandomValues' in cryptoApi; } window.cutsTheMustard = (