mirror of https://github.com/BTCPrivate/copay.git
Fix unsupported pages if browser not support localStorage
This commit is contained in:
parent
f1fe437f7b
commit
95bfd555f2
|
@ -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',
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue