Browse Source

修复调整map报错

Hwf 2 months ago
parent
commit
be31e18c19
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/views/globalMap/index.vue

+ 1 - 1
src/views/globalMap/index.vue

@@ -442,7 +442,7 @@ watch(
     if (loaded) {
       map = getMap();
       mapUtils = getMapUtils();
-      if (!!map) {
+      if (!!map && Object.keys(map).length !== 0) {
         map.on('moveend', mapMoveEnd);
       }
     }