Merge pull request #12632 from mike-000/patch-10
Only warn of zero size when map should be visible
This commit is contained in:
@@ -1524,7 +1524,14 @@ class PluggableMap extends BaseObject {
|
|||||||
parseFloat(computedStyle['borderBottomWidth']);
|
parseFloat(computedStyle['borderBottomWidth']);
|
||||||
if (!isNaN(width) && !isNaN(height)) {
|
if (!isNaN(width) && !isNaN(height)) {
|
||||||
size = [width, height];
|
size = [width, height];
|
||||||
if (!hasArea(size)) {
|
if (
|
||||||
|
!hasArea(size) &&
|
||||||
|
!!(
|
||||||
|
targetElement.offsetWidth ||
|
||||||
|
targetElement.offsetHeight ||
|
||||||
|
targetElement.getClientRects().length
|
||||||
|
)
|
||||||
|
) {
|
||||||
// eslint-disable-next-line
|
// eslint-disable-next-line
|
||||||
console.warn(
|
console.warn(
|
||||||
"No map visible because the map container's width or height are 0."
|
"No map visible because the map container's width or height are 0."
|
||||||
|
|||||||
Reference in New Issue
Block a user