Parcourir la source

fix: http://192.168.0.21/index.php?m=bug&f=view&bugID=37857

jinx il y a 2 ans
Parent
commit
0ccbd5622a
1 fichiers modifiés avec 3 ajouts et 0 suppressions
  1. 3 0
      src/graphic/Service/RoadService.js

+ 3 - 0
src/graphic/Service/RoadService.js

@@ -1084,6 +1084,9 @@ export default class RoadService {
   //单车道不考虑dir1
   setLanes(roadId, dir1, dir2) {
     let road = dataService.getRoad(roadId);
+    if(!road){
+      return
+    }
     if (road.way == Constant.oneWay) {
       this.setOneWayLanes(road, dir1, dir2);
     } else if (road.way == Constant.twoWay) {