[gnome-maps/gnome-3-38] placeEntry: Use previously stored search term for caching
- From: Marcus Lundblad <mlundblad src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [gnome-maps/gnome-3-38] placeEntry: Use previously stored search term for caching
- Date: Wed,  7 Oct 2020 20:41:45 +0000 (UTC)
commit a12d4ecbb95c9b0d4d9cd14c32825c398524629b
Author: Marcus Lundblad <ml update uu se>
Date:   Tue Oct 6 22:56:15 2020 +0200
    placeEntry: Use previously stored search term for caching
    
    When caching search results use previously saved search string
    as the "text" property could change before the callback was called.
 src/placeEntry.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/placeEntry.js b/src/placeEntry.js
index 494784d9..3f0749f6 100644
--- a/src/placeEntry.js
+++ b/src/placeEntry.js
@@ -266,7 +266,7 @@ var PlaceEntry = GObject.registerClass({
                 this._updateResults(places);
 
                 // cache results for later
-                this._cache[this.text] = places;
+                this._cache[this._previousSearch] = places;
             }
 
             // if search input has been updated, trigger a refresh
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]