diff --git a/Gruntfile.js b/Gruntfile.js index 575fd0f64..c062a6aef 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -79,6 +79,7 @@ module.exports = function(grunt) { angular: { src: [ 'bower_components/fastclick/lib/fastclick.js', + 'bower_components/modernizr/modernizr.js', 'bower_components/qrcode-generator/js/qrcode.js', 'bower_components/qrcode-decoder-js/lib/qrcode-decoder.js', 'bower_components/moment/min/moment-with-locales.js', diff --git a/src/js/routes.js b/src/js/routes.js index 7ceea95a4..ae6b1def7 100644 --- a/src/js/routes.js +++ b/src/js/routes.js @@ -7,6 +7,11 @@ if (window && window.navigator) { var isaosp = (rxaosp && rxaosp[1] < 537); if (!window.cordova && isaosp) unsupported = true; + if (!Modernizr.localstorage) + unsupported = true; + if (unsupported) { + window.location = '#/unsupported'; + } } @@ -463,11 +468,6 @@ angular $rootScope.$emit('Animation/SwipeLeft'); } - if (unsupported) { - $state.transitionTo('unsupported'); - event.preventDefault(); - } - if (!profileService.profile && toState.needProfile) { // Try to open local profile