mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 08:02:39 +08:00
fix: Modify the judgment condition (#12050)
* fix: Modify the judgment condition * fix: Modify the judgment condition
This commit is contained in:
@@ -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}`,
|
||||
|
||||
Reference in New Issue
Block a user