diff --git a/cocos/scene-graph/node.jsb.ts b/cocos/scene-graph/node.jsb.ts index 5a026e2115..489eae3d90 100644 --- a/cocos/scene-graph/node.jsb.ts +++ b/cocos/scene-graph/node.jsb.ts @@ -181,9 +181,9 @@ nodeProto.addComponent = function (typeOrClassName) { throw TypeError(getError(3810)); } - // if (EDITOR && (constructor as typeof constructor & { _disallowMultiple?: unknown })._disallowMultiple) { - // this._checkMultipleComp!(constructor); - // } + if (EDITOR && (constructor as typeof constructor & { _disallowMultiple?: unknown })._disallowMultiple) { + this._checkMultipleComp!(constructor); + } // check requirement