Skip to content

Commit b280a23

Browse files
committed
fix(OUT-2269-re): also checked replaced placeholders on original template and default state
1 parent f1dabbb commit b280a23

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

src/app/components/EditorInterface.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,10 @@ const EditorInterface = ({
215215
appState?.appState.originalTemplate
216216
) {
217217
if (
218-
appState?.appState.originalTemplate?.replace(/\s/g, '') !==
218+
replaceCustomLabelsWithPlaceholders(
219+
appState?.appState.originalTemplate?.replace(/\s/g, ''),
220+
appState?.appState?.customLabels,
221+
) !==
219222
replaceCustomLabelsWithPlaceholders(
220223
defaultState.replaceAll(' ', ''),
221224
appState?.appState?.customLabels,
@@ -237,7 +240,10 @@ const EditorInterface = ({
237240
appState?.appState.originalTemplate
238241
) {
239242
if (
240-
appState?.appState.originalTemplate?.toString() !==
243+
replaceCustomLabelsWithPlaceholders(
244+
appState?.appState.originalTemplate?.toString(),
245+
appState?.appState?.customLabels,
246+
) !==
241247
replaceCustomLabelsWithPlaceholders(
242248
appState?.appState.settings?.content?.toString(),
243249
appState?.appState?.customLabels,

0 commit comments

Comments
 (0)