mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-12 19:52:51 +00:00
fix: fallback focusNode to root if empty
This commit is contained in:
parent
f61e2a2b8a
commit
a9a118fe6e
@ -93,7 +93,7 @@ export class DocumentModel {
|
||||
this.rootNode?.getExtraProp('fileName', true)?.setValue(fileName);
|
||||
}
|
||||
|
||||
@computed get focusNode() {
|
||||
get focusNode() {
|
||||
if (this._drillDownNode) {
|
||||
return this._drillDownNode;
|
||||
}
|
||||
|
||||
@ -89,7 +89,7 @@ export default class DocumentModel {
|
||||
}
|
||||
|
||||
get focusNode(): Node {
|
||||
return this._focusNode;
|
||||
return this._focusNode || this.root;
|
||||
}
|
||||
|
||||
set focusNode(node: Node) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user