Skip to content

Commit 4a60005

Browse files
authored
fix(google-maps): avoid using dotted property access (#21074)
* 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'.
1 parent b07c539 commit 4a60005

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/google-maps/map-marker/map-marker.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -279,23 +279,23 @@ export class MapMarker implements OnInit, OnChanges, OnDestroy, MapAnchorPoint {
279279
const {marker, _title, _position, _label, _clickable} = this;
280280

281281
if (marker) {
282-
if (changes.options) {
282+
if (changes['options']) {
283283
marker.setOptions(this._combineOptions());
284284
}
285285

286-
if (changes.title && _title !== undefined) {
286+
if (changes['title'] && _title !== undefined) {
287287
marker.setTitle(_title);
288288
}
289289

290-
if (changes.position && _position) {
290+
if (changes['position'] && _position) {
291291
marker.setPosition(_position);
292292
}
293293

294-
if (changes.label && _label !== undefined) {
294+
if (changes['label'] && _label !== undefined) {
295295
marker.setLabel(_label);
296296
}
297297

298-
if (changes.clickable && _clickable !== undefined) {
298+
if (changes['clickable'] && _clickable !== undefined) {
299299
marker.setClickable(_clickable);
300300
}
301301
}

0 commit comments

Comments
 (0)