Skip to content
This repository has been archived by the owner on May 20, 2022. It is now read-only.

Commit

Permalink
Fixing issue when setting the values of a point in the input fields.
Browse files Browse the repository at this point in the history
  • Loading branch information
constantinius committed Jan 16, 2017
1 parent 86cf75b commit 3781d68
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/views/FiltersView.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,11 @@ export default Marionette.LayoutView.extend({
.get()
.map(parseFloat);

if (coordinates.reduce((prev, current) => prev & !isNaN(current), true)) {
this.filtersModel.set('area', { geometry: { type: 'Point', coordinates } });
if (coordinates.reduce((prev, current) => prev && !isNaN(current), true)) {
this.filtersModel.set('area', {
geometry: { type: 'Point', coordinates },
type: 'Feature',
});
}
},

Expand All @@ -216,7 +219,7 @@ export default Marionette.LayoutView.extend({
.get()
.map(parseFloat);

if (bbox.reduce((prev, current) => prev & !isNaN(current), true)) {
if (bbox.reduce((prev, current) => prev && !isNaN(current), true)) {
this.filtersModel.set('area', bbox);
}
},
Expand Down

0 comments on commit 3781d68

Please sign in to comment.