Skip to content

Commit

Permalink
feat(vue-next): fix hippytext setText (#3790)
Browse files Browse the repository at this point in the history
Co-authored-by: OpenHippy <[email protected]>
  • Loading branch information
zealotchen0 and open-hippy authored Mar 26, 2024
1 parent b550202 commit 5a7434d
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,14 @@ export class HippyText extends HippyNode {
super(NodeType.TextNode, ssrNode);
this.text = text;
this.data = text;

// text nodes do not need to be inserted into Native
this.isNeedInsertToNative = false;
}

public setText(text: string): void {
this.text = text;
if (this.parentNode && this.nodeType === NodeType.ElementNode) {
if (this.parentNode && this.parentNode.nodeType === NodeType.ElementNode) {
(this.parentNode as HippyElement).setText(text);
}
}
Expand Down

0 comments on commit 5a7434d

Please sign in to comment.