aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/StyleProvider.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2024-10-17 13:31:25 -0400
committerbobzel <zzzman@gmail.com>2024-10-17 13:31:25 -0400
commit5e3f9d84da226e62ce109cc2c0b00ba76eb45189 (patch)
tree7516f80d96cb28088a49b1cba0edf7df78821c47 /src/client/views/StyleProvider.tsx
parent14f412611299fc350f13b6f96be913d59533cfb3 (diff)
parent4a9330e996b9117fb27560b9898b6fc1dbb78f96 (diff)
Merge branch 'master' into ajs-before-executable
Diffstat (limited to 'src/client/views/StyleProvider.tsx')
-rw-r--r--src/client/views/StyleProvider.tsx3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/client/views/StyleProvider.tsx b/src/client/views/StyleProvider.tsx
index 02e0a34d8..8859f6464 100644
--- a/src/client/views/StyleProvider.tsx
+++ b/src/client/views/StyleProvider.tsx
@@ -54,7 +54,6 @@ export function styleFromLayoutString(doc: Doc, props: FieldViewProps, scale: nu
}
export function border(doc: Doc, pw: number, ph: number, rad: number = 0, inset: number = 0) {
- if (!rad) rad = 0;
const width = pw * inset;
const height = ph * inset;
@@ -218,7 +217,7 @@ export function DefaultStyleProvider(doc: Opt<Doc>, props: Opt<FieldViewProps &
const radiusRatio = borderRadius / docWidth;
const radius = radiusRatio * ((2 * borderWidth) + docWidth);
- const borderPath = doc && border(doc, NumCast(doc._width), NumCast(doc._height), radius, -ratio/2 ?? 0);
+ const borderPath = doc && border(doc, NumCast(doc._width), NumCast(doc._height), radius, -ratio/2);
return !borderPath
? null
: {