Bug changing polyline stroke after creation
Version
2.3.2
Steps to reproduce
Create a ui-gmap-polylines with a stroke property, like so:
<ui-gmap-polylines ng-if="vm.mapJourneyPolylinePaths && vm.mapJourneyPolylinePaths.length > 0"
models="vm.mapJourneyPolylinePaths"
idKey="'id'"
path="'path'"
stroke="'options.stroke'"
clickable="true"
icons="'options.icons'"
events="'options.events'">
</ui-gmap-polylines>
Have some UI function that allows highlight of particular lines. Then highlight the line by changing the stroke properties like so
this.mapJourneyPolylinePaths.forEach(p => {
if (p.data === journey) {
p.options.stroke.color = "#00426a";
//p.options.stroke.opacity = 0.9;
p.options.stroke.weight = 4;
} else {
p.options.stroke.color = "#999";
//p.options.stroke.opacity = 0.4;
p.options.stroke.weight = 2;
}
});
Expected Behavior
Line stroke changes
Actual Behavior
The lines stroke does change as expected, but in the console the following error is produced
TypeError: Cannot convert object to primitive value at RegExp.test (native) at isKey (http://localhost:3000/bower_components/lodash/lodash.js:6235:28) at baseGet (http://localhost:3000/bower_components/lodash/lodash.js:3018:14) at Function.get (http://localhost:3000/bower_components/lodash/lodash.js:13039:49) at BasePolysParentModel._Class.scopeOrModelVal (http://localhost:3000/bower_components/angular-google-maps/dist/angular-google-maps.js:1588:25) at BasePolysParentModel._Class.setChildScope (http://localhost:3000/bower_components/angular-google-maps/dist/angular-google-maps.js:1614:31) at BasePolysParentModel.setChildScope (http://localhost:3000/bower_components/angular-google-maps/dist/angular-google-maps.js:1447:61) at http://localhost:3000/bower_components/angular-google-maps/dist/angular-google-maps.js:4357:32 at Scope.$digest (http://localhost:3000/bower_components/angular/angular.js:17524:23) at Scope.$apply (http://localhost:3000/bower_components/angular/angular.js:17790:24)(anonymous function) @ angular.js:13920(anonymous function) @ angular.js:10467$digest @ angular.js:17542$apply @ angular.js:17790(anonymous function) @ angular.js:25890dispatch @ jquery.js:5087elemData.handle @ jquery.js:4895