Skip to content

Commit

Permalink
fix: build
Browse files Browse the repository at this point in the history
  • Loading branch information
theajack3 committed Feb 7, 2023
1 parent f9438b6 commit 441ee45
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/element/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {IReactBinding} from 'alins-utils';
import {IUpdatedCallback, LifeMountedCollector, mountLifes} from '../builder/life';
import {appendFragment} from '../builder/dom-proxy';
import {IElement, IElementBuilder, IElementOptions, mergeDomInfo, TChild} from '../builder/builder';
import {text} from 'src/builder/text';
import {text} from '../builder/text';


// const map: Map<string, TFPMemo> = new Map();
Expand Down Expand Up @@ -67,7 +67,7 @@ export function transformBuilderToDom (builder: IElementBuilder): HTMLElement {
config.lifes.updated?.exe() as IUpdatedCallback,
);
if (children.length > 0)
config.children[binding.index] = children;
config.children[binding.index ?? config.children.length] = children;
mergeDomInfo(config, domInfo);
}

Expand Down
2 changes: 1 addition & 1 deletion packages/utils/src/types/react.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export interface IReactBindingTemplate<T=any> {
template: string[], // TemplateStringsArray
reactions: (TReactionItem<T>)[], // | any[], // ? 为了绑定的时候不报类型错误

index: number;
index?: number;
}
export interface IReactBindingTemplateFactory<T=any> {
add(d: IReactBindingTemplate<T>): void;
Expand Down

0 comments on commit 441ee45

Please sign in to comment.