Skip to content

Commit

Permalink
Fix WMTS to return a valid object when array
Browse files Browse the repository at this point in the history
  • Loading branch information
offtherailz committed Apr 4, 2017
1 parent 929f2d6 commit 41a1ee6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/client/utils/WMTSUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const WMTSUtils = {
return CoordinatesUtils.getEquivalentSRS(srs, allowedSRS).reduce((previous, current) => {
if (isArray(tileMatrixSet)) {
const matching = head(tileMatrixSet.filter((matrix) => (matrix["ows:Identifier"] === current || CoordinatesUtils.getEPSGCode(matrix["ows:SupportedCRS"]) === current)));
return matching && matching["ows:Identifier"] && !matrixIds[previous] || previous;
return matching && matching["ows:Identifier"] && !matrixIds[previous] ? current : previous;
} else if (isObject(tileMatrixSet)) {
return tileMatrixSet[current] || previous;
}
Expand Down

0 comments on commit 41a1ee6

Please sign in to comment.