Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"pretest:unit": "tsx tests/scripts/generate-story-imports.ts",
"test:unit": "vitest run",
"test:unit:watch": "vitest --browser.headless=false",
"watch": "xs watch",
"watch": "vite build --watch",
"prepare": "husky"
},
"lint-staged": {
Expand Down
6 changes: 5 additions & 1 deletion src/components/LayoutContainer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,11 @@ export class LayoutContainer extends Container {
* @protected
*/
protected _drawBackground(computedLayout: ComputedLayout) {
const borderWidth = this.layout!.yoga.getBorder(Edge.All);
let borderWidth = this.layout!.yoga.getBorder(Edge.All);

if (isNaN(borderWidth) || borderWidth < 0) {
borderWidth = 0;
}
const boxSizing = this.layout!.yoga.getBoxSizing();
const alignment = boxSizing === BoxSizing.BorderBox ? 1 : 0;

Expand Down
Loading