From 24f259ecfb4736e2b678d8715eebb969e52db89e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A2=81=E7=82=9C=E6=B5=B7?= <35713518+dogodo-cc@users.noreply.github.com> Date: Thu, 21 Jul 2022 11:57:23 +0800 Subject: [PATCH] fix: Modify the judgment condition (#12050) * fix: Modify the judgment condition * fix: Modify the judgment condition --- editor/inspector/contributions/node.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/editor/inspector/contributions/node.js b/editor/inspector/contributions/node.js index 31b0adf90e..7b4e38758d 100644 --- a/editor/inspector/contributions/node.js +++ b/editor/inspector/contributions/node.js @@ -1473,7 +1473,7 @@ exports.methods = { const lastIndex = length - 1; const lastComp = nodeDump.__comps__[lastIndex]; - if (lastComp && lastComp.type === clipboardComponentInfo.type) { + if (lastComp?.cid === clipboardComponentInfo.cid) { await Editor.Message.request('scene', 'set-property', { uuid, path: `__comps__.${lastIndex}`, @@ -1596,7 +1596,7 @@ exports.methods = { const lastIndex = length - 1; const lastComp = nodeDump.__comps__[lastIndex]; - if (lastComp && lastComp.type === clipboardComponentInfo.type) { + if (lastComp?.cid === clipboardComponentInfo.cid) { await Editor.Message.request('scene', 'set-property', { uuid, path: `__comps__.${lastIndex}`,