A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.
TypeScript 2d-game-engine3d3d-game-engineandroidcppecsgame-editorgame-enginegamedeviostypescriptwebassemblywebglwebgpuwechat-minigame
Revert "fix: gracefully handle missing EditorContainer during project creation"
esenginee16ed5705a17
diff --git a/editor/src/schemas/ComponentSchemas.ts b/editor/src/schemas/ComponentSchemas.tsindex 273401564..ef1a9b7fa 100644--- a/editor/src/schemas/ComponentSchemas.ts+++ b/editor/src/schemas/ComponentSchemas.ts@@ -266,14 +266,10 @@ export function getDefaultComponentData(typeName: string): Record<string, unknowexport function getInitialComponentData(typeName: string): Record<string, unknown> {const defaults = getDefaultComponentData(typeName);- try {- const schema = getEditorContainer().get(COMPONENT_SCHEMA, typeName);- const overrides = schema?.editorDefaults?.();- if (overrides) {- return { ...defaults, ...overrides };- }- } catch {- // EditorContainer may not be initialized yet (e.g. during project creation from launcher)+ const schema = getEditorContainer().get(COMPONENT_SCHEMA, typeName);+ const overrides = schema?.editorDefaults?.();+ if (overrides) {+ return { ...defaults, ...overrides };}return defaults;}