Don't try and route to a note with no ID

Fixes #733
This commit is contained in:
Tom Hughes 2014-04-26 00:13:49 +01:00
parent b700d30ae4
commit e85bcf9c4d

View file

@ -34,7 +34,9 @@ function initializeNotes(map) {
});
noteLayer.on('click', function(e) {
OSM.router.route('/note/' + e.layer.id);
if (e.layer.id) {
OSM.router.route('/note/' + e.layer.id);
}
});
function updateMarker(marker, feature) {