1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-29 22:48:10 +02:00

Handle case when note is deleted while being edited. Show note on map.

This commit is contained in:
Laurent Cozic
2017-07-22 19:16:16 +01:00
parent 4f7edf8371
commit 729b8f7c79
6 changed files with 88 additions and 60 deletions

View File

@@ -42,7 +42,7 @@ class Note extends BaseItem {
}
static geolocationUrl(note) {
if (!('latitude' in note) || !('longitude' in note)) throw new Error('Latitude or longitude missing');
if (!('latitude' in note) || !('longitude' in note)) throw new Error('Latitude or longitude is missing');
if (!note.latitude && !note.longitude) throw new Error(_('This note does not have geolocation information.'));
return sprintf('https://www.openstreetmap.org/?lat=%s&lon=%s&zoom=20', note.latitude, note.longitude)
}