Skip to content

Commit

Permalink
fix(olHelpers): remove startsWith as not supported in IE
Browse files Browse the repository at this point in the history
(resolves #358)
  • Loading branch information
juristr committed Mar 10, 2017
1 parent 83c6a1a commit c32119f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/services/olHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
Expand Down

0 comments on commit c32119f

Please sign in to comment.