Browse Source

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

jinx 2 years ago
parent
commit
0ccbd5622a
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/graphic/Service/RoadService.js

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

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