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

Diff for: src/openlayers/overlay/vectortile/MapboxStyles.js

+1-1
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)