aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/StyleProvider.tsx
diff options
context:
space:
mode:
authorA.J. Shulman <Shulman.aj@gmail.com>2024-10-17 17:41:49 -0400
committerA.J. Shulman <Shulman.aj@gmail.com>2024-10-17 17:41:49 -0400
commitc933ae724c1bf77fa8bd83c3c9e27d0029ef5cb0 (patch)
treedf16f68e9bdb822e5f91c997a431c4b130377290 /src/client/views/StyleProvider.tsx
parent98d0bba3e59ab7ec9dfbf5e6c9c58e6ac1d22ae3 (diff)
parentdd93f5175064850c6c0e47f025cd7bbba1f23106 (diff)
Merge branch 'ajs-before-executable' of https://github.com/brown-dash/Dash-Web 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
: {