Skip to content

Commit

Permalink
fix(place.js): build lng lat array always from lng and lat attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
amoncaldas committed Jan 19, 2022
1 parent f8c2cce commit 20e3b2b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/models/place.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,7 @@ class Place {
* @returns {Array} containing [lng, lat]
*/
getLngLatArr() {
if (this.coordinates) {
return this.coordinates
}
if (this.lat !== 0 && this.lng !== 0) {
if (this.lat !== null && this.lng !== null) {
return [this.lng, this.lat]
} else {
if (this.nameIsCoord()) {
Expand Down

0 comments on commit 20e3b2b

Please sign in to comment.