-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Strick check
undefined !== filter
for attributes within `QGISProvid…
…er::getFeatures()` (editing plugin) (#482)
- Loading branch information
Showing
1 changed file
with
7 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,9 @@ const Filter = require('core/layers/filter/filter'); | |
const GETFEATUREINFO_IMAGE_SIZE = [101, 101]; | ||
const DPI = geoutils.getDPI(); | ||
|
||
const is_defined = d => undefined !== d; | ||
|
||
|
||
/** | ||
* ORIGINAL SOURCE: src/app/core/layers/providers/[email protected] | ||
*/ | ||
|
@@ -390,7 +393,7 @@ const Providers = { | |
url, | ||
contentType: 'application/json', | ||
}); | ||
} else if (filter.bbox) { // bbox filter | ||
} else if (is_defined(filter.bbox)) { // bbox filter | ||
promise = XHR.post({ | ||
url, | ||
data: JSON.stringify({ | ||
|
@@ -399,20 +402,20 @@ const Providers = { | |
}), | ||
contentType: 'application/json', | ||
}) | ||
} else if (filter.fid) { // fid filter | ||
} else if (is_defined(filter.fid)) { // fid filter | ||
promise = RelationsService.getRelations(filter.fid); | ||
} else if (filter.field) { | ||
promise = XHR.post({ | ||
url, | ||
data: JSON.stringify(filter), | ||
contentType: 'application/json', | ||
}) | ||
} else if (filter.fids) { | ||
} else if (is_defined(filter.fids)) { | ||
promise = XHR.get({ | ||
url, | ||
params: filter | ||
}) | ||
} else if (filter.nofeatures) { | ||
} else if (is_defined(filter.nofeatures)) { | ||
promise = XHR.post({ | ||
url, | ||
data: JSON.stringify({ | ||
|