Skip to content

Commit f61d9a9

Browse files
fix 修复对矢量瓦片 sprite 不存在时判断不正确
1 parent 5128539 commit f61d9a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/openlayers/overlay/vectortile/MapboxStyles.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ export class MapboxStyles extends Observable {
410410
})
411411
}
412412
if (fieldName === 'sprite' || fieldName === 'glyphs' || fieldName === 'url') {
413-
if (typeof styles[fieldName] === 'string' && !CommonUtil.isAbsoluteURL(styles[fieldName])) {
413+
if (styles[fieldName] && typeof styles[fieldName] === 'string' && !CommonUtil.isAbsoluteURL(styles[fieldName])) {
414414
styles[fieldName] = CommonUtil.relative2absolute(styles[fieldName], baseUrl);
415415
}
416416
if (paramUrl && !styles[fieldName].includes(paramUrl)) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy