From ecd4d60cc3f1a613e03253fde658d709d524fdc9 Mon Sep 17 00:00:00 2001 From: dwrik <67830799+dwrik@users.noreply.github.com> Date: Mon, 29 Jul 2024 19:54:51 +0530 Subject: [PATCH] fix(ui): editable region boundaries not persisting on refresh (#55658) --- client/src/redux/prop-types.ts | 1 + client/src/templates/Challenges/classic/saved-challenges.ts | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/client/src/redux/prop-types.ts b/client/src/redux/prop-types.ts index c965096e151..7a5969f0c52 100644 --- a/client/src/redux/prop-types.ts +++ b/client/src/redux/prop-types.ts @@ -364,6 +364,7 @@ export type SavedChallengeFile = { ext: Ext; name: string; history?: string[]; + editableRegionBoundaries?: number[]; contents: string; }; diff --git a/client/src/templates/Challenges/classic/saved-challenges.ts b/client/src/templates/Challenges/classic/saved-challenges.ts index ed8c03d3f54..9f0c0042515 100644 --- a/client/src/templates/Challenges/classic/saved-challenges.ts +++ b/client/src/templates/Challenges/classic/saved-challenges.ts @@ -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 })); }