File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -202,7 +202,7 @@ export class Attribution {
202
202
const attribution = createLicensorAttribution ( providers ) ;
203
203
const list = this . renderList ( filtered ) ;
204
204
205
- if ( list . length ) {
205
+ if ( list . length > 0 ) {
206
206
return `${ attribution } - ${ list } ` ;
207
207
} else {
208
208
return attribution ;
Original file line number Diff line number Diff line change @@ -239,11 +239,11 @@ export async function createTileSetAttribution(
239
239
240
240
// ensure imagery exist for the given projection
241
241
const imgId = tileSet . layers [ 0 ] [ projection . code ] ;
242
- if ( imgId === undefined ) return '' ;
242
+ if ( imgId == null ) return '' ;
243
243
244
244
// attempt to load the imagery
245
245
const imagery = await provider . Imagery . get ( imgId ) ;
246
- if ( imagery == null || imagery . providers == null ) {
246
+ if ( imagery ? .providers == null ) {
247
247
return createLicensorAttribution ( ) ;
248
248
}
249
249
Original file line number Diff line number Diff line change @@ -167,7 +167,7 @@ export class MapAttribution implements maplibre.IControl {
167
167
Config . map . emit ( 'visibleLayers' , filteredLayerIds ) ;
168
168
169
169
const attributionHTML = attr . renderLicense ( filtered ) ;
170
- this . setAttribution ( attributionHTML ?? '' ) ;
170
+ this . setAttribution ( attributionHTML ) ;
171
171
} ;
172
172
173
173
setAttribution ( text : string ) : void {
You can’t perform that action at this time.
0 commit comments