Commit a40b7b60 authored by 李纪文's avatar 李纪文

fix: 修改登录报错

parent 04916db7
Pipeline #44592 passed with stages
in 1 minute 55 seconds
...@@ -255,6 +255,7 @@ class Login { ...@@ -255,6 +255,7 @@ class Login {
// this.events.removeAllListeners('toggleIndustry') // this.events.removeAllListeners('toggleIndustry')
// window.share.event = this.events; // window.share.event = this.events;
if ( if (
self.globalConfig.userInfo &&
self.globalConfig.userInfo.site && self.globalConfig.userInfo.site &&
self.globalConfig.userInfo.site.length > 0 self.globalConfig.userInfo.site.length > 0
) { ) {
...@@ -348,7 +349,7 @@ class Login { ...@@ -348,7 +349,7 @@ class Login {
widgetIndex = index; widgetIndex = index;
}); });
const { layers } = this.globalConfig.mapsettings; const { layers = [] } = this.globalConfig.mapsettings || {};
if (layers.length === 0) { if (layers.length === 0) {
widgetIndex !== -1 && this.globalConfig.uiwidgets.splice(widgetIndex, 1); widgetIndex !== -1 && this.globalConfig.uiwidgets.splice(widgetIndex, 1);
return Promise.resolve({}); return Promise.resolve({});
......
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