diff --git a/src/render/background.ts b/src/render/background.ts index 6e0e877..dd92d17 100644 --- a/src/render/background.ts +++ b/src/render/background.ts @@ -58,7 +58,7 @@ export const calculateBackgroundRendering = ( backgroundPositioningArea ); - const [sizeWidth, sizeHeight] = backgroundImageSize; + let [sizeWidth, sizeHeight] = backgroundImageSize; const position = getAbsoluteValueForTuple( getBackgroundValueForIndex(container.styles.backgroundPosition, index), @@ -77,6 +77,9 @@ export const calculateBackgroundRendering = ( const offsetX = Math.round(backgroundPositioningArea.left + position[0]); const offsetY = Math.round(backgroundPositioningArea.top + position[1]); + sizeWidth = Math.max(1,sizeWidth) + sizeHeight = Math.max(1,sizeHeight) + return [path, offsetX, offsetY, sizeWidth, sizeHeight]; };