Finished of cloud backup and restore feature

This commit is contained in:
Alicia Sykes
2021-05-24 20:46:58 +01:00
parent 0e43e91d84
commit 5b729cfbdd
6 changed files with 41 additions and 22 deletions

View File

@@ -60,7 +60,9 @@ export default {
pageInfo.title = this.formElements.title;
pageInfo.description = this.formElements.description;
pageInfo.footerText = this.formElements.footerText;
pageInfo.navLinks = this.formElements.navLinks.filter(link => (link.title !== ''));
if (this.formElements.navLinks) {
pageInfo.navLinks = this.formElements.navLinks.filter(link => (link.title !== ''));
}
localStorage.setItem(localStorageKeys.PAGE_INFO, JSON.stringify(pageInfo));
this.$toasted.show('Changes saved succesfully');
setTimeout(() => { location.reload(); }, 1500); // eslint-disable-line no-restricted-globals