mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-09-03 06:16:11 +08:00
fix(editor): root为空时异常处理
This commit is contained in:
parent
327fc47aa1
commit
7d62c09c6b
@ -91,7 +91,7 @@ class Editor extends BaseService {
|
||||
log('store set ', name, ' ', value);
|
||||
|
||||
if (name === 'root') {
|
||||
this.state.pageLength = (value as unknown as MApp).items.length;
|
||||
this.state.pageLength = (value as unknown as MApp)?.items?.length || 0;
|
||||
this.emit('root-change', value);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user