ElemeFE / ElemeFE/element-react

【重要】resize-event.js removeResizeListener undefined报错

Open
#833 4 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
2.8k
Forks
435
PR merge metrics
No merged PRs in 30d

Description

### Description
在Select 组件上经常发生报错,会导致页面崩溃

### Reproduce Steps
不太确认复现步骤,应该是Select组件快速 `mount`和`unmount`,结果`element.__resizeListeners__.splice`里的`__resizeListeners__`是undefined

### Error Trace (if possible)
```
clientMiddleware.js:43 [clientMiddleware] error catched! error: TypeError: Cannot read property 'splice' of undefined
at removeResizeListener (resize-event.js:185)
at ProxyComponent.componentWillUnmount (Select.js:190)
at ProxyComponent.proxiedComponentWillUnmount (createPrototypeProxy.js:81)

```

It's better to post up the error stack for us to trace this issue.

### Solution

What needs to be done to address this issue? Ideally, provide a pull request with a fix.

### Additional Information

Any additional information, configuration or data that might be necessary to reproduce the issue.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.