Skip to content

Commit 3f56b0c

Browse files
committed
Fix opacity when the attribute is provided at page load, _opacity is
not set (setter not run), should return the attribute value if _opacity is nullish.
1 parent 5105086 commit 3f56b0c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/layer.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export class MapLayer extends HTMLElement {
4848
}
4949

5050
get opacity() {
51-
return this._opacity;
51+
return this._opacity ?? this.getAttribute('opacity');
5252
}
5353

5454
set opacity(val) {

0 commit comments

Comments
 (0)