From e967d0255f27860b4c37b3def9085e7ff031290a Mon Sep 17 00:00:00 2001 From: Manish-Builder-io Date: Tue, 28 Apr 2026 18:59:49 +0530 Subject: [PATCH] fix[smartling]: fix Clear translation metadata button not working `content.meta` is a MobX observable Map; calling `fastClone` on it (JSON.parse/JSON.stringify) serialises it as `{}`, so the subsequent `delete` calls were no-ops and `updateLatestDraft` was called with an empty meta object instead of the correctly-stripped one. Replace `fastClone(content.meta)` with `{ ...content.meta?.toJS() }` to match the identical pattern already used in the backend's `cleanupOrphanedTranslationMetadata` helper in `smartling.ts`. Co-Authored-By: Claude Sonnet 4.6 --- plugins/smartling/src/plugin.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/smartling/src/plugin.tsx b/plugins/smartling/src/plugin.tsx index 7f6ce9db774..ddfcdd624dc 100644 --- a/plugins/smartling/src/plugin.tsx +++ b/plugins/smartling/src/plugin.tsx @@ -852,7 +852,7 @@ const initializeSmartlingPlugin = async () => { message: 'This will clear all translation metadata from this content. Are you sure?', }); if (result) { - const updatedMeta = fastClone(content.meta); + const updatedMeta = { ...content.meta?.toJS() }; delete updatedMeta.translationStatus; delete updatedMeta.translationJobId; delete updatedMeta.translationBy;