Skip to content

Commit

Permalink
Fixes #1219: some issues in CSW catalog parsing of WMS services (#1293)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbarto authored Nov 25, 2016
1 parent 56df40b commit d3a681a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions web/client/utils/CatalogUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

const assign = require('object-assign');
const {head, isArray} = require('lodash');
const {head, isArray, isString} = require('lodash');
const urlUtil = require('url');

const getWMSBBox = (record) => {
Expand Down Expand Up @@ -83,7 +83,7 @@ const converters = {
});
}

if (wms) {
if (wms && wms.name) {
let absolute = (wms.value.indexOf("http") === 0);
if (!absolute) {
assign({}, wms, {value: options.catalogURL + "/" + wms.value} );
Expand All @@ -108,11 +108,11 @@ const converters = {

// setup the final record object
return {
title: dc.title,
description: dc.abstract,
identifier: dc.identifier,
title: isString(dc.title) && dc.title || '',
description: isString(dc.abstract) && dc.abstract || '',
identifier: isString(dc.identifier) && dc.identifier || '',
thumbnail: thumbURL,
tags: dc.subject,
tags: isString(dc.subject) && dc.subject || '',
boundingBox: record.boundingBox,
references: references
};
Expand Down

0 comments on commit d3a681a

Please sign in to comment.