File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -237,10 +237,12 @@ export abstract class MapViewBase extends View implements MapView {
237237 }
238238
239239 public _getInfoWindowTemplate ( marker : MarkerBase ) : KeyedTemplate {
240- const templateKey = marker . infoWindowTemplate ;
241- for ( let i = 0 , length = this . _infoWindowTemplates . length ; i < length ; i ++ ) {
242- if ( this . _infoWindowTemplates [ i ] . key === templateKey ) {
243- return this . _infoWindowTemplates [ i ] ;
240+ if ( marker ) {
241+ const templateKey = marker . infoWindowTemplate ;
242+ for ( let i = 0 , length = this . _infoWindowTemplates . length ; i < length ; i ++ ) {
243+ if ( this . _infoWindowTemplates [ i ] . key === templateKey ) {
244+ return this . _infoWindowTemplates [ i ] ;
245+ }
244246 }
245247 }
246248 return this . _defaultInfoWindowTemplate ;
@@ -575,4 +577,4 @@ export class CircleBase extends ShapeBase implements Circle {
575577 public strokeWidth : number ;
576578 public strokeColor : Color ;
577579 public fillColor : Color ;
578- }
580+ }
You can’t perform that action at this time.
0 commit comments