浏览代码

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

jinx 2 年之前
父节点
当前提交
0ccbd5622a
共有 1 个文件被更改,包括 3 次插入0 次删除
  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) {