mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-12 17:08:14 +00:00
fix: 修复 mobx 数组元素在获取超出边界时报错
This commit is contained in:
parent
0672f3b8cc
commit
f4e07fe290
@ -250,7 +250,7 @@ export class NodeChildren {
|
||||
* 根据索引获得节点
|
||||
*/
|
||||
get(index: number): Node | null {
|
||||
return this.children[index] || null;
|
||||
return this.children.length > index ? this.children[index] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import lodashGet from 'lodash.get';
|
||||
import { ComponentType } from 'react';
|
||||
import { get as lodashGet } from 'lodash';
|
||||
|
||||
export interface EngineOptions {
|
||||
/**
|
||||
@ -59,6 +60,10 @@ export interface EngineOptions {
|
||||
* 当选中节点切换时,是否停留在相同的设置 tab 上,默认值:false
|
||||
*/
|
||||
stayOnTheSameSettingTab?: boolean;
|
||||
/**
|
||||
* 自定义 loading 组件
|
||||
*/
|
||||
loadingComponent?: ComponentType;
|
||||
/**
|
||||
* Vision-polyfill settings
|
||||
*/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user