Update migrateDictionary to account for changes

This commit is contained in:
Robbie Antenesse 2019-06-07 11:18:43 -06:00 committed by Robbie Antenesse
parent e6b973165a
commit b476b69bb4
1 changed files with 3 additions and 0 deletions

View File

@ -304,8 +304,11 @@ export function migrateDictionary() {
window.currentDictionary = Object.assign({}, DEFAULT_DICTIONARY, window.currentDictionary);
window.currentDictionary.partsOfSpeech = window.currentDictionary.settings.partsOfSpeech.split(',').map(val => val.trim()).filter(val => val !== '');
delete window.currentDictionary.settings.partsOfSpeech;
delete window.currentDictionary.nextWordId;
window.currentDictionary.settings.sortByDefinition = window.currentDictionary.settings.sortByEquivalent;
delete window.currentDictionary.settings.sortByEquivalent;
window.currentDictionary.settings.theme = 'default';
delete window.currentDictionary.settings.isComplete;
migrated = true;
} else if (window.currentDictionary.version !== MIGRATE_VERSION) {