File tree 1 file changed +6
-1
lines changed
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -117,6 +117,11 @@ export default class LayerEditor extends React.Component {
117
117
comment = this . props . layer . metadata [ 'maputnik:comment' ]
118
118
}
119
119
120
+ let sourceLayerIds ;
121
+ if ( this . props . sources . hasOwnProperty ( this . props . layer . source ) ) {
122
+ sourceLayerIds = this . props . sources [ this . props . layer . source ] . layers ;
123
+ }
124
+
120
125
switch ( type ) {
121
126
case 'layer' : return < div >
122
127
< LayerIdBlock
@@ -134,7 +139,7 @@ export default class LayerEditor extends React.Component {
134
139
/>
135
140
}
136
141
{ this . props . layer . type !== 'raster' && this . props . layer . type !== 'background' && < LayerSourceLayerBlock
137
- sourceLayerIds = { this . props . sources [ this . props . layer . source ] . layers }
142
+ sourceLayerIds = { sourceLayerIds }
138
143
value = { this . props . layer [ 'source-layer' ] }
139
144
onChange = { v => this . changeProperty ( null , 'source-layer' , v ) }
140
145
/>
You can’t perform that action at this time.
0 commit comments