1
0
Fork 0

Update messagegui.app.js

To include "toward" as well for better compatibility when splitting street name directions up
master
stweedo 2023-05-29 18:17:06 -05:00 committed by GitHub
parent 8ef7b42af5
commit 7be4bfb05e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -84,8 +84,8 @@ function showMapMessage(msg) {
if (msg.distance!==undefined)
distance = require("locale").distance(msg.distance);
if (msg.instr) {
if (msg.instr.includes("towards")) {
m = msg.instr.split("towards");
if (msg.instr.includes("towards") || msg.instr.includes("toward")) {
m = msg.instr.split(/towards|toward/);
target = m[0].trim();
street = m[1].trim();
}else