Commit bc16ef64 authored by cellee's avatar cellee

传递小区为空判断

Signed-off-by: cellee's avatarcellee <893264950@qq.com>
parent dcc905e6
......@@ -93,8 +93,11 @@ class SelectOptions extends React.PureComponent {
componentWillReceiveProps(nextProps) {
// 如果存在更新 就拿取最新的选中小区值
// 判断是不是props 的最新值 否则每次点击都要更新
if (nextProps.checklist.sort().toString() !== this.props.checklist.sort().toString()) {
if (
nextProps.checklist &&
this.props.checklist &&
nextProps.checklist.sort().toString() !== this.props.checklist.sort().toString()
) {
this.setState({
checkedList: nextProps.checklist,
resultList: nextProps.checklist,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment