mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-20 23:52:40 +08:00
remove missing-script compiled attrbute (#8131)
* remove missing-script compiled attrbute * method 'safeFindClass' consistent-return
This commit is contained in:
@@ -60,31 +60,26 @@ export default class MissingScript extends Component {
|
||||
* @param {string} id
|
||||
* @return {function} constructor
|
||||
*/
|
||||
public static safeFindClass (id: string) {
|
||||
public static safeFindClass(id: string) {
|
||||
const cls = _getClassById(id);
|
||||
if (cls) {
|
||||
return cls;
|
||||
}
|
||||
legacyCC.deserialize.reportMissingClass(id);
|
||||
}
|
||||
|
||||
@editable
|
||||
public compiled = false;
|
||||
return undefined;
|
||||
}
|
||||
|
||||
// the serialized data for original script object
|
||||
@serializable
|
||||
@editorOnly
|
||||
public _$erialized = null;
|
||||
|
||||
constructor () {
|
||||
constructor() {
|
||||
super();
|
||||
if (EDITOR) {
|
||||
// @ts-expect-error
|
||||
this.compiled = _Scene.Sandbox.compiled;
|
||||
}
|
||||
}
|
||||
|
||||
public onLoad () {
|
||||
public onLoad() {
|
||||
warnID(4600, this.node.name);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user