Skip to content

Commit 53e0ac9

Browse files
committed
Allow background-color to use default from spec.
1 parent 206396b commit 53e0ac9

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

src/apply.js

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -558,17 +558,15 @@ function getBackgroundColor(glLayer, resolution, options, functionCache) {
558558
resolution,
559559
options.resolutions || defaultResolutions
560560
);
561-
let bg, opacity;
562-
if (paint['background-color'] !== undefined) {
563-
bg = getValue(
564-
background,
565-
'paint',
566-
'background-color',
567-
zoom,
568-
emptyObj,
569-
functionCache
570-
);
571-
}
561+
let opacity;
562+
const bg = getValue(
563+
background,
564+
'paint',
565+
'background-color',
566+
zoom,
567+
emptyObj,
568+
functionCache
569+
);
572570
if (paint['background-opacity'] !== undefined) {
573571
opacity = getValue(
574572
background,

0 commit comments

Comments
 (0)