File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -14,14 +14,14 @@ export var Geometry = L.FeatureGroup.extend({
14
14
L . LayerGroup . prototype . initialize . call ( this , layers , options ) ;
15
15
this . _featureEl = this . options . mapmlFeature ;
16
16
17
+ let firstLayer = layers [ Object . keys ( layers ) [ 0 ] ] ;
18
+ if ( layers . length === 1 && firstLayer . options . link )
19
+ this . options . link = firstLayer . options . link ;
17
20
if (
18
21
( this . options . onEachFeature && this . options . properties ) ||
19
22
this . options . link
20
23
) {
21
24
L . DomUtil . addClass ( this . options . group , 'leaflet-interactive' ) ;
22
- let firstLayer = layers [ Object . keys ( layers ) [ 0 ] ] ;
23
- if ( layers . length === 1 && firstLayer . options . link )
24
- this . options . link = firstLayer . options . link ;
25
25
if ( this . options . link ) {
26
26
M . Path . prototype . attachLinkHandler . call (
27
27
this ,
You can’t perform that action at this time.
0 commit comments