Commit 8490bb5f486fbbfd842ea85d1ce6cb7d06468b1b
1 parent
9fe139bf
update
Showing
1 changed file
with
8 additions
and
6 deletions
src/main/resources/static/pages/control/line/js/data.js
| ... | ... | @@ -325,12 +325,14 @@ var _data = (function(){ |
| 325 | 325 | function abnormalCheck(gps){ |
| 326 | 326 | var routes = stationRoute[gps.lineId][gps.upDown] |
| 327 | 327 | ,rs; |
| 328 | - $.each(routes , function(){ | |
| 329 | - if(this.stationCode == gps.stopNo){ | |
| 330 | - rs = 1; | |
| 331 | - return false; | |
| 332 | - } | |
| 333 | - }); | |
| 328 | + if(routes){ | |
| 329 | + $.each(routes , function(){ | |
| 330 | + if(this.stationCode == gps.stopNo){ | |
| 331 | + rs = 1; | |
| 332 | + return false; | |
| 333 | + } | |
| 334 | + }); | |
| 335 | + } | |
| 334 | 336 | |
| 335 | 337 | if(!rs){ |
| 336 | 338 | gps.abnormal = true; | ... | ... |