Merge pull request #1437 from hackmdio/fix/geo-map-not-support-minus

Fix west longitude and south latitude not parsed correctly in geo map
This commit is contained in:
Max Wu 2020-03-02 18:09:30 +08:00 committed by GitHub
commit 0c919381c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -450,7 +450,7 @@ export function finishView (view) {
try {
let position, zoom
if (content.match(/^[\d.,\s]+$/)) {
if (content.match(/^[-\d.,\s]+$/)) {
const [lng, lat, zoo] = content.split(',').map(parseFloat)
zoom = zoo
position = [lat, lng]