Places: Don't update params for small changes

Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
Michael Mayer 2019-12-17 17:15:59 +01:00
parent 82a02e5032
commit 380bc4ec6c

View file

@ -130,11 +130,11 @@
const changed = Math.abs(this.query.lat - pos.lat) > 0.001 || const changed = Math.abs(this.query.lat - pos.lat) > 0.001 ||
Math.abs(this.query.long - pos.lng) > 0.001; Math.abs(this.query.long - pos.lng) > 0.001;
if(!changed) return;
this.query.lat = pos.lat.toString(); this.query.lat = pos.lat.toString();
this.query.long = pos.lng.toString(); this.query.long = pos.lng.toString();
if(!changed) return;
this.search(); this.search();
}, },
startPos() { startPos() {