Skip to content

Commit 168e447

Browse files
committed
fix(storefront): Prevent changing Picture widths array prop by reference
1 parent 67cab97 commit 168e447

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/storefront/src/images/use-ssr-picture.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ const useSSRPicture = async (params: UsePictureParams) => {
8787
src,
8888
alt,
8989
sizes: propSizes,
90-
widths,
9190
aspectRatio: propAspectRatio,
9291
fit,
9392
background,
@@ -101,6 +100,7 @@ const useSSRPicture = async (params: UsePictureParams) => {
101100
assetsPrefix,
102101
...attrs
103102
} = params;
103+
const widths = [...params.widths];
104104

105105
let aspectRatio: number | undefined;
106106
if (propAspectRatio) {

0 commit comments

Comments
 (0)