react antd Warning: must set key for rc-animate children

location 有可能是一个‘’,”.split() 将输出[“”],是个含有空字符串的数组,而[]是个什么都没有的数组,两者不同。
code:
change initialValue from :
initialValue:   location.split(‘,’) || []
to:
initialValue: location === ” ? [] : location.split(‘,’)
 

Related Posts

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注