Skip to content

Commit 5a7de08

Browse files
author
Per Liedman
committed
Check that target exists before using it
1 parent 0c479f5 commit 5a7de08

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/L.Routing.OSRMv1.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
}
8989
} else {
9090
error.message = 'HTTP request failed: ' + err.type +
91-
(err.target.status ? ' HTTP ' + err.target.status + ': ' + err.target.statusText : '');
91+
(err.target && err.target.status ? ' HTTP ' + err.target.status + ': ' + err.target.statusText : '');
9292
error.url = url;
9393
error.status = -1;
9494
error.target = err;

0 commit comments

Comments
 (0)