diff --git a/plugins/smartling/package-lock.json b/plugins/smartling/package-lock.json index c4cdef10696..8945beabc15 100644 --- a/plugins/smartling/package-lock.json +++ b/plugins/smartling/package-lock.json @@ -1,12 +1,12 @@ { "name": "@builder.io/plugin-smartling", - "version": "0.1.1", + "version": "0.1.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@builder.io/plugin-smartling", - "version": "0.1.1", + "version": "0.1.2", "license": "MIT", "dependencies": { "@builder.io/utils": "1.1.30", diff --git a/plugins/smartling/package.json b/plugins/smartling/package.json index 7707c947276..00fc3bd37ff 100644 --- a/plugins/smartling/package.json +++ b/plugins/smartling/package.json @@ -1,6 +1,6 @@ { "name": "@builder.io/plugin-smartling", - "version": "0.1.1", + "version": "0.1.2", "description": "", "keywords": [], "main": "dist/plugin.system.js", diff --git a/plugins/smartling/src/plugin.tsx b/plugins/smartling/src/plugin.tsx index 7f6ce9db774..9ae475c53d3 100644 --- a/plugins/smartling/src/plugin.tsx +++ b/plugins/smartling/src/plugin.tsx @@ -848,11 +848,12 @@ const initializeSmartlingPlugin = async () => { ); }, async onClick(content) { - const result = await appState.dialogs.confirm({ - message: 'This will clear all translation metadata from this content. Are you sure?', - }); + const result = await appState.dialogs.confirm( + 'This will clear all translation metadata from this content. Are you sure?' + ); if (result) { - const updatedMeta = fastClone(content.meta); + const metadata = typeof content.meta?.toJS === 'function' ? content.meta.toJS() : content.meta; + const updatedMeta = { ...(metadata || {}) }; delete updatedMeta.translationStatus; delete updatedMeta.translationJobId; delete updatedMeta.translationBy;