refactor(sdk): use WidgetNode union in goView converter
This commit is contained in:
parent
01b55b260d
commit
5f67a5bca1
@ -1,11 +1,8 @@
|
||||
import {
|
||||
ASTRALVIEW_SCHEMA_VERSION,
|
||||
createEmptyScreen,
|
||||
type ImageWidgetNode,
|
||||
type IframeWidgetNode,
|
||||
type Screen,
|
||||
type TextWidgetNode,
|
||||
type VideoWidgetNode,
|
||||
type WidgetNode,
|
||||
} from '../schema';
|
||||
import { convertGoViewImageOptionToNodeProps, type GoViewImageOption } from '../widgets/image';
|
||||
import { convertGoViewIframeOptionToNodeProps, type GoViewIframeOption } from '../widgets/iframe';
|
||||
@ -654,7 +651,7 @@ export function convertGoViewProjectToScreen(input: GoViewProjectLike | GoViewSt
|
||||
[];
|
||||
const componentList = Array.isArray(componentListRaw) ? componentListRaw : [];
|
||||
|
||||
const nodes: Array<TextWidgetNode | ImageWidgetNode | IframeWidgetNode | VideoWidgetNode> = [];
|
||||
const nodes: WidgetNode[] = [];
|
||||
|
||||
for (const raw of componentList) {
|
||||
if (!raw || typeof raw !== 'object') continue;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user