Skip to content

Commit

Permalink
fix(#274): Add logic to store management to fix custom store save issue
Browse files Browse the repository at this point in the history
  • Loading branch information
PinkPenguin418 committed May 13, 2024
1 parent a886cba commit f013336
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/narrat/src/stores/stores-management.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,12 @@ export function extractSaveData(): ExtractedSave {
// Add save data from potential custom stores
vm.customStores().forEach(([storeName, store]) => {
if (store.save) {
const saveData = store.save();
if (saveData) {
saveData.customStores[storeName] = saveData;
const customStoreSaveData = store.save();
if (customStoreSaveData) {
if(saveData.customStores == undefined) {
saveData.customStores = {};
}
saveData.customStores[storeName] = customStoreSaveData;
}
}
});
Expand Down

0 comments on commit f013336

Please sign in to comment.