fix: Modify the judgment condition (#12050)

* fix: Modify the judgment condition

* fix: Modify the judgment condition
This commit is contained in:
袁炜海
2022-07-21 11:57:23 +08:00
committed by GitHub
parent 3261ab1930
commit 24f259ecfb
+2 -2
View File
@@ -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}`,