aboutsummaryrefslogtreecommitdiff
path: root/src/ClientUtils.ts
diff options
context:
space:
mode:
authorsharkiecodes <lanyi_stroud@brown.edu>2025-06-10 11:12:23 -0400
committersharkiecodes <lanyi_stroud@brown.edu>2025-06-10 11:12:23 -0400
commit272534c8a7517d08c70928c96d487d84b14772f6 (patch)
tree0e3e9a8cc83b8ba96b2bd49c9fc726b16411d60c /src/ClientUtils.ts
parentc5981504058e0696827b4048fcd908a58fb0b0d3 (diff)
parentb91057d00512446339e48fb8488a97a1e5ef03d5 (diff)
Merge branch 'master' into lanyi-branch
Diffstat (limited to 'src/ClientUtils.ts')
-rw-r--r--src/ClientUtils.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ClientUtils.ts b/src/ClientUtils.ts
index 03ff13924..8eb1a39ec 100644
--- a/src/ClientUtils.ts
+++ b/src/ClientUtils.ts
@@ -194,7 +194,7 @@ export namespace ClientUtils {
}
export function CorsProxy(url: string): string {
- return prepend('/corsProxy/') + encodeURIComponent(url);
+ return prepend('/corsproxy/') + encodeURIComponent(url);
}
export function CopyText(text: string) {
@@ -670,7 +670,8 @@ export function setupMoveUpEvents(
}
export function DivHeight(ele: HTMLElement | null): number {
- return ele ? Number(getComputedStyle(ele).height.replace('px', '')) : 0;
+ const hgt = ele ? Number(getComputedStyle(ele).height.replace('px', '')) : 0;
+ return Number.isNaN(hgt) ? 0 : hgt;
}
export function DivWidth(ele: HTMLElement | null): number {
return ele ? Number(getComputedStyle(ele).width.replace('px', '')) : 0;