Commit 34eb5506 authored by 李纪文's avatar 李纪文

fix: 修改dom不存在报错

parent eb6abb72
......@@ -915,7 +915,8 @@ const ConfigurationView = (props) => {
nodeDataArray: [],
linkDataArray: [],
};
if (DomRef && !DomRef.current) return setNoInitial(true);
const twoDom = document.getElementById(TwoRef.current);
if ((DomRef && !DomRef.current) || !twoDom) return setNoInitial(true);
mqttView = devicesCode.length
? new MqttView({
mqttIP: globalConfig.mqtt_iotIP,
......@@ -3057,7 +3058,11 @@ const ConfigurationView = (props) => {
return (
<div className={classNames(prefixCls)} ref={ConfigurationRef}>
<div id={TwoRef.current} ref={ConfigurationViewRef} className={classNames('configurationView')}>
<div
id={TwoRef.current}
ref={ConfigurationViewRef}
className={classNames('configurationView')}
>
{/* <LoadBox spinning={spinning} /> */}
{isEmpty && <Empty theme={'dark'} description={description} />}
</div>
......
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