Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
clearInvalidCache() {
let saved = this.storage.getItem(this.getStorageKey());
if (saved && saved.columnVisibility) {
let savedIds = keys(saved.columnVisibility).sort();
let schemaIds = this.columnSchema.mapBy('id').sort();
if (!compareArrays(savedIds, schemaIds)) {
// Clear saved items
this.storage.removeItem(this.getStorageKey());
}
}
}