[gnome-maps/gnome-40] placeStore: Don't match existing place on null
- From: Marcus Lundblad <mlundblad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps/gnome-40] placeStore: Don't match existing place on null
- Date: Wed, 31 Mar 2021 20:22:33 +0000 (UTC)
commit da963ebde95f63f5a6903709b602ec6b32572f21
Author: Marcus Lundblad <ml update uu se>
Date: Tue Mar 30 22:03:42 2021 +0200
placeStore: Don't match existing place on null
Don't match existing places on null when not
specifying type. This avoid returning true
when place was unfavored and marked with
null in the mapping.
src/placeStore.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/placeStore.js b/src/placeStore.js
index 72bf50ab..8dd8ed4a 100644
--- a/src/placeStore.js
+++ b/src/placeStore.js
@@ -320,7 +320,8 @@ class PlaceStore extends Gtk.ListStore {
if (type !== undefined && type !== null && this._typeTable[place.uniqueID] !== undefined)
return this._typeTable[place.uniqueID] === type;
else
- return this._typeTable[place.uniqueID] !== undefined;
+ return this._typeTable[place.uniqueID] !== undefined &&
+ this._typeTable[place.uniqueID] !== null;
}
existsWithOsmTypeAndId(osmType, osmId) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]