fix(ui): editable region boundaries not persisting on refresh (#55658)

This commit is contained in:
dwrik
2024-07-29 19:54:51 +05:30
committed by GitHub
parent 2a36629aa3
commit ecd4d60cc3
2 changed files with 4 additions and 1 deletions

View File

@@ -364,6 +364,7 @@ export type SavedChallengeFile = {
ext: Ext;
name: string;
history?: string[];
editableRegionBoundaries?: number[];
contents: string;
};

View File

@@ -23,6 +23,8 @@ export function mergeChallengeFiles(
return sortedChallengeFiles.map((file, index) => ({
...file,
contents: sortedSavedChallengeFiles[index].contents
contents: sortedSavedChallengeFiles[index].contents,
editableRegionBoundaries:
sortedSavedChallengeFiles[index].editableRegionBoundaries
}));
}