File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -183,6 +183,7 @@ jsBoot.pack('jsBoot.service', function(api) {
183
183
184
184
if ( success && ! this . error )
185
185
success ( this . data ) ;
186
+ // XXX Roxee depends on this old API
186
187
if ( failure && this . error )
187
188
failure ( this . error , this . data ) ;
188
189
} ;
Original file line number Diff line number Diff line change @@ -215,14 +215,16 @@ jsBoot.pack('jsBoot.utils', function(api) {
215
215
} ,
216
216
217
217
write : function ( key , data , callback ) {
218
- console . warn ( 'jey writte!' ) ;
218
+ console . warn ( 'jey writte!' , key , data , callback ) ;
219
219
key = prefix + '_' + ( key || '' ) ;
220
220
try {
221
221
store . setItem ( key , json . stringify ( data ) ) ;
222
- setTimeout ( callback , 1 , true ) ;
222
+ if ( callback )
223
+ setTimeout ( callback , 1 , true ) ;
223
224
} catch ( e ) {
224
225
store . removeItem ( key ) ;
225
- setTimeout ( callback , 1 , false ) ;
226
+ if ( callback )
227
+ setTimeout ( callback , 1 , false ) ;
226
228
throw new api . Error ( 'DATA_CORRUPTION' ,
227
229
'Writing into the dataStore failed. This may be indicative of a possible data corruption.' ) ;
228
230
}
You can’t perform that action at this time.
0 commit comments