Skip to content

Commit 032f324

Browse files
committed
Do not use undefined dimensions on visuals
1 parent c5519c7 commit 032f324

File tree

3 files changed

+214
-12
lines changed

3 files changed

+214
-12
lines changed

package-lock.json

Lines changed: 211 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
"@rsbuild/plugin-node-polyfill": "1.4.2",
8181
"@rsbuild/plugin-stylus": "1.2.0",
8282
"@rsdoctor/rspack-plugin": "1.3.16",
83-
"@rslib/core": "0.18.4",
83+
"@rslib/core": "0.18.5",
8484
"@storybook/addon-a11y": "10.1.10",
8585
"@storybook/addon-docs": "10.1.10",
8686
"@storybook/addon-links": "10.1.10",

src/wrappers/visuals.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,13 +127,13 @@ class Visuals extends Despot {
127127
heightDimension = this.getRecorderHeight(true);
128128
}
129129

130-
if (widthDimension) {
130+
if (widthDimension?.value) {
131131
this.visualsElement.style.width = `${widthDimension.value}${widthDimension.unit}`;
132132
} else {
133133
this.visualsElement.style.removeProperty("width");
134134
}
135135

136-
if (heightDimension) {
136+
if (heightDimension?.value) {
137137
this.visualsElement.style.height = `${heightDimension.value}${heightDimension.unit}`;
138138
} else {
139139
this.visualsElement.style.removeProperty("height");

0 commit comments

Comments
 (0)