Skip to content

Commit 640b3e3

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

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
@@ -411,7 +411,7 @@
411411
})
412412
}
413413
if (fieldName === 'sprite' || fieldName === 'glyphs' || fieldName === 'url') {
414-
if (typeof styles[fieldName] === 'string' && !CommonUtil.isAbsoluteURL(styles[fieldName])) {
414+
if (styles[fieldName] && typeof styles[fieldName] === 'string' && !CommonUtil.isAbsoluteURL(styles[fieldName])) {
415415
styles[fieldName] = CommonUtil.relative2absolute(styles[fieldName], baseUrl);
416416
}
417417
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