mirror of https://github.com/espruino/BangleApps
Update messagegui.app.js
To include "toward" as well for better compatibility when splitting street name directions uppull/2786/head
parent
8ef7b42af5
commit
7be4bfb05e
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue