File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
packages/core/src/view/node Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 11import { createElement as h , Component } from 'preact/compat'
22import { reaction , IReactionDisposer } from 'mobx'
3- import { map } from 'lodash-es'
3+ import { map , isFunction , isNil } from 'lodash-es'
44import Anchor from '../Anchor'
55import { BaseText } from '../text'
66import LogicFlow from '../../LogicFlow'
@@ -410,8 +410,7 @@ export abstract class BaseNode<P extends IProps = IProps> extends Component<
410410 // 复制粘贴后会出现点击节点时,节点会失去焦点的问题,这里手动让节点获焦以解决这个问题
411411 const el = e . currentTarget as HTMLElement
412412 const rAF =
413- typeof window !== 'undefined' &&
414- typeof window . requestAnimationFrame === 'function'
413+ ! isNil ( window ) && isFunction ( window . requestAnimationFrame )
415414 ? window . requestAnimationFrame . bind ( window )
416415 : ( fn : ( ) => void ) => setTimeout ( fn , 0 )
417416 rAF ( ( ) => {
You can’t perform that action at this time.
0 commit comments