diff --git a/web-ui/src/main/resources/catalog/components/edit/onlinesrc/OnlineSrcDirective.js b/web-ui/src/main/resources/catalog/components/edit/onlinesrc/OnlineSrcDirective.js index ec8b4098706..a2bb60fb980 100644 --- a/web-ui/src/main/resources/catalog/components/edit/onlinesrc/OnlineSrcDirective.js +++ b/web-ui/src/main/resources/catalog/components/edit/onlinesrc/OnlineSrcDirective.js @@ -678,7 +678,13 @@ // }); // } // Add each WMS layer to the map - scope.layers = scope.gnCurrentEdit.layerConfig; + if (scope.gnCurrentEdit.layerConfig == undefined) { + scope.layers = scope.gnCurrentEdit.layerConfig; + } else { + scope.layers = Array.isArray(scope.gnCurrentEdit.layerConfig) + ? scope.gnCurrentEdit.layerConfig + : [scope.gnCurrentEdit.layerConfig]; + } angular.forEach(scope.gnCurrentEdit.layerConfig, function (layer) { scope.map.addLayer( new ol.layer.Tile({