File tree Expand file tree Collapse file tree 2 files changed +20
-10
lines changed
Expand file tree Collapse file tree 2 files changed +20
-10
lines changed Original file line number Diff line number Diff line change 4545
4646 //Go pull any previously saved data
4747 buildfire . datastore . getWithDynamicData ( function ( err , result ) {
48- if ( ! err ) {
49- $scope . datastoreInitialized = true ;
50- } else {
51- console . error ( "Error: " , err ) ;
52- return ;
48+ if ( err || ! result ) {
49+ console . error ( err , 'Error while getting datastore.' ) ;
50+ buildfire . dialog . toast ( {
51+ message : "Error while loading data. Retrying again in 2 seconds..." ,
52+ duration : 1999
53+ } ) ;
54+ setTimeout ( ( ) => location . reload ( ) , 2000 ) ;
55+ return ;
5356 }
5457
58+ $scope . datastoreInitialized = true ;
59+
5560 var firstTimeVisit = false ;
5661 if ( ! result . id ) {
5762 result . data = Utility . getDefaultScopeData ( ) ;
Original file line number Diff line number Diff line change 1919 } ) ;
2020 //Go pull any previously saved data
2121 buildfire . datastore . getWithDynamicData ( function ( err , result ) {
22- if ( ! err ) {
23- $scope . datastoreInitialized = true ;
24- } else {
25- console . error ( "Error: " , err ) ;
26- return ;
22+ if ( err || ! result ) {
23+ console . error ( err , 'Error while getting datastore.' ) ;
24+ buildfire . dialog . toast ( {
25+ message : "Error while loading data. Retrying again in 2 seconds..." ,
26+ duration : 1999
27+ } ) ;
28+ setTimeout ( ( ) => location . reload ( ) , 2000 ) ;
29+ return ;
2730 }
2831
32+ $scope . datastoreInitialized = true ;
33+
2934 if ( result && result . data && ! angular . equals ( { } , result . data ) ) {
3035 $scope . data = result . data ;
3136 $scope . id = result . id ;
You can’t perform that action at this time.
0 commit comments