mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-13 09:41:57 +00:00
polyfill getRoot
This commit is contained in:
parent
208bccfcb9
commit
1e642089cb
@ -450,6 +450,11 @@ export class DocumentModel {
|
||||
const config = parent.componentMeta;
|
||||
return config.checkNestingDown(parent, obj) && this.checkNestingUp(parent, obj);
|
||||
}
|
||||
|
||||
// ======= compatibles
|
||||
getRoot() {
|
||||
return this.rootNode;
|
||||
}
|
||||
}
|
||||
|
||||
export function isDocumentModel(obj: any): obj is DocumentModel {
|
||||
|
||||
@ -469,7 +469,7 @@ export class Node {
|
||||
|
||||
// ======= compatibles ====
|
||||
isEmpty(): boolean {
|
||||
return this.children?.isEmpty() || true;
|
||||
return this.children ? this.children.isEmpty() : true;
|
||||
}
|
||||
getStatus() {
|
||||
return 'default';
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user