Clear localStorage before db destroy
This commit is contained in:
@@ -32,6 +32,7 @@ class ComponentManager {
|
|||||||
for(var component of syncedComponents) {
|
for(var component of syncedComponents) {
|
||||||
var activeComponent = _.find(this.activeComponents, {uuid: component.uuid});
|
var activeComponent = _.find(this.activeComponents, {uuid: component.uuid});
|
||||||
if(component.active && !activeComponent) {
|
if(component.active && !activeComponent) {
|
||||||
|
console.log("Activating comp", component);
|
||||||
this.activateComponent(component);
|
this.activateComponent(component);
|
||||||
} else if(!component.active && activeComponent) {
|
} else if(!component.active && activeComponent) {
|
||||||
this.deactivateComponent(component);
|
this.deactivateComponent(component);
|
||||||
|
|||||||
@@ -325,8 +325,8 @@ class SyncManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
destroyLocalData(callback) {
|
destroyLocalData(callback) {
|
||||||
|
localStorage.clear();
|
||||||
this.dbManager.clearAllItems(function(){
|
this.dbManager.clearAllItems(function(){
|
||||||
localStorage.clear();
|
|
||||||
if(callback) {
|
if(callback) {
|
||||||
this.$timeout(function(){
|
this.$timeout(function(){
|
||||||
callback();
|
callback();
|
||||||
|
|||||||
Reference in New Issue
Block a user