diff --git a/app/assets/javascripts/app/services/apiController.js b/app/assets/javascripts/app/services/apiController.js index 07e5bffcc..23c198ed6 100644 --- a/app/assets/javascripts/app/services/apiController.js +++ b/app/assets/javascripts/app/services/apiController.js @@ -90,7 +90,7 @@ angular.module('app.frontend') // if user has high password cost and is using browser that doesn't support WebCrypto, // we want to tell them that they can't login with this browser. if(cost > 5000) { - return window.crypto.subtle ? true : false; + return (window.crypto && window.crypto.subtle) ? true : false; } else { return true; } diff --git a/app/views/application/frontend.html.erb b/app/views/application/frontend.html.erb index 429187e7f..5e965dc17 100644 --- a/app/views/application/frontend.html.erb +++ b/app/views/application/frontend.html.erb @@ -1,4 +1,4 @@ - +