Skip to content

Commit 9609782

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

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
@@ -388,7 +388,7 @@ export class MapboxStyles extends Observable {
388388
})
389389
}
390390
if (fieldName === 'sprite' || fieldName === 'glyphs' || fieldName === 'url') {
391-
if (typeof styles[fieldName] === 'string' && !CommonUtil.isAbsoluteURL(styles[fieldName])) {
391+
if (styles[fieldName] && typeof styles[fieldName] === 'string' && !CommonUtil.isAbsoluteURL(styles[fieldName])) {
392392
styles[fieldName] = CommonUtil.relative2absolute(styles[fieldName], baseUrl);
393393
}
394394
}

0 commit comments

Comments
 (0)