[gnome-maps/wip/mlundblad/localized-population: 3/3] place: Parse population as integer




commit 8a2bd1480f46a22f7204cc880f4a1adf1e35f51f
Author: Marcus Lundblad <ml update uu se>
Date:   Tue Aug 25 23:28:54 2020 +0200

    place: Parse population as integer

 src/place.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/place.js b/src/place.js
index 675e3320..10d53202 100644
--- a/src/place.js
+++ b/src/place.js
@@ -57,7 +57,8 @@ class Place extends Geocode.Place {
         this._isCurrentLocation = params.isCurrentLocation;
         delete params.isCurrentLocation;
 
-        this._population = params.population;
+        // handle existing entries from the place store using strings
+        this._population = parseInt(params.population);
         delete params.population;
 
         this._website = params.website;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]