From 76d7016a33ac42a48f65c8da3db85e83549087a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Maih=C3=B6fer?= Date: Wed, 18 Dec 2024 17:16:00 +0100 Subject: [PATCH] keep youtube and examplepatch when cloning to other/new version - cables-gl/cables/issues/6738 --- shared/api/utils/shared_ops_util.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/shared/api/utils/shared_ops_util.js b/shared/api/utils/shared_ops_util.js index 97673cf..8c8f830 100644 --- a/shared/api/utils/shared_ops_util.js +++ b/shared/api/utils/shared_ops_util.js @@ -2792,9 +2792,12 @@ export default class SharedOpsUtil extends SharedUtil } if (!Array.isArray(newJson.changelog)) newJson.changelog = []; - if (newJson.hasOwnProperty("exampleProjectId")) delete newJson.exampleProjectId; - if (newJson.hasOwnProperty("youtubeid")) delete newJson.youtubeid; - if (newJson.hasOwnProperty("youtubeids")) delete newJson.youtubeids; + if (this.getOpNameWithoutVersion(newName) !== this.getOpNameWithoutVersion(oldName)) + { + if (newJson.hasOwnProperty("exampleProjectId")) delete newJson.exampleProjectId; + if (newJson.hasOwnProperty("youtubeid")) delete newJson.youtubeid; + if (newJson.hasOwnProperty("youtubeids")) delete newJson.youtubeids; + } if (this.getOpNameWithoutVersion(oldName) !== this.getOpNameWithoutVersion(newName)) {