Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/v3.4.0' into share/NewGenAnim
Browse files Browse the repository at this point in the history
  • Loading branch information
shrinktofit committed Aug 31, 2021
2 parents 18c2ee6 + 5146f67 commit 4391043
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cocos/core/data/editor-extendable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ export function EditorExtendableMixin<T> (Base: new (...args: any[]) => T, class
return editorExtendableInternal(Base);
}

class Empty {}

/**
* Class which implements the `EditorExtendableObject` interface.
*/
Expand All @@ -36,7 +38,7 @@ function editorExtendableInternal<T> (Base?: (new (...args: any[]) => T), classN
type ResultType = new (...args: any[]) => (T & EditorExtendableObject);

if (!EDITOR) {
return (Base ?? Object) as unknown as ResultType;
return (Base ?? Empty) as unknown as ResultType;
}

let name: string;
Expand Down

0 comments on commit 4391043

Please sign in to comment.