Skip to content

Commit

Permalink
fix(google-maps): avoid using dotted property access (#21074)
Browse files Browse the repository at this point in the history
* This was causing internal errors because these properties
  are not declared on SimpleChanges. According to the error:
  'The type has a string index signature, but it is being
  accessed using a dotted property access'.

(cherry picked from commit 4a60005)
  • Loading branch information
wagnermaciel committed Nov 18, 2020
1 parent 445b1a5 commit 3ee3e30
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/google-maps/map-marker/map-marker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,23 +279,23 @@ export class MapMarker implements OnInit, OnChanges, OnDestroy, MapAnchorPoint {
const {marker, _title, _position, _label, _clickable} = this;

if (marker) {
if (changes.options) {
if (changes['options']) {
marker.setOptions(this._combineOptions());
}

if (changes.title && _title !== undefined) {
if (changes['title'] && _title !== undefined) {
marker.setTitle(_title);
}

if (changes.position && _position) {
if (changes['position'] && _position) {
marker.setPosition(_position);
}

if (changes.label && _label !== undefined) {
if (changes['label'] && _label !== undefined) {
marker.setLabel(_label);
}

if (changes.clickable && _clickable !== undefined) {
if (changes['clickable'] && _clickable !== undefined) {
marker.setClickable(_clickable);
}
}
Expand Down

0 comments on commit 3ee3e30

Please sign in to comment.