[gnome-maps/wip/mlundblad/fix-unfavorite] placeStore: Don't match existing place on null
- From: Marcus Lundblad <mlundblad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps/wip/mlundblad/fix-unfavorite] placeStore: Don't match existing place on null
- Date: Tue, 30 Mar 2021 20:08:40 +0000 (UTC)
commit 2962820d6e6397ef940d331c9ea28029366ee469
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]