diff --git a/src/services/olHelpers.js b/src/services/olHelpers.js index 34ca94d6..45bdd962 100644 --- a/src/services/olHelpers.js +++ b/src/services/olHelpers.js @@ -935,9 +935,10 @@ angular.module('openlayers-directive').factory('olHelpers', function($q, $log, $ for (var property in layer) { if (layer.hasOwnProperty(property) && // ignore props like source or those angular might add (starting with $) - !property.startsWith('$') && - !property.startsWith('source') && - !property.startsWith('style') + // don't use startsWith as it is not supported in IE + property.indexOf('$', 0) !== 0 && + property.indexOf('source', 0) !== 0 && + property.indexOf('style', 0) !== 0 ) { layerConfig[property] = layer[property]; }