File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -12,14 +12,20 @@ export function destroyAllDataPermanently(fast) {
12
12
return Promise . all (
13
13
Object . keys ( AppCache . cache ) . map ( appId => {
14
14
const app = AppCache . get ( appId ) ;
15
+ const deletePromises = [ ] ;
16
+ if ( app . cacheAdapter ) {
17
+ deletePromises . push ( app . cacheAdapter . clear ( ) ) ;
18
+ }
15
19
if ( app . databaseController ) {
16
- return app . databaseController . deleteEverything ( fast ) ;
17
- } else if ( app . databaseAdapter ) {
20
+ deletePromises . push ( app . databaseController . deleteEverything ( fast ) ) ;
21
+ }
22
+ if ( app . databaseAdapter ) {
18
23
SchemaCache . clear ( ) ;
19
- return app . databaseAdapter . deleteAllClasses ( fast ) ;
24
+ deletePromises . push ( app . databaseAdapter . deleteAllClasses ( fast ) ) ;
20
25
} else {
21
- return Promise . resolve ( ) ;
26
+ console . log ( 'could not delete' , app ) ;
22
27
}
28
+ return Promise . all ( deletePromises ) ;
23
29
} )
24
30
) ;
25
31
}
You can’t perform that action at this time.
0 commit comments