Skip to content

Commit

Permalink
Fixes #1219: some issues in CSW catalog parsing of WMS services
Browse files Browse the repository at this point in the history
  • Loading branch information
mbarto committed Nov 24, 2016
1 parent 56df40b commit 61d6569
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 61d6569

Please sign in to comment.