mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-18 21:45:31 +09:00
fix: tighten edge cases across services (#3158)
This commit is contained in:
1 parent
a9f7a23c0d
commit
4e6b837ccc
170 files changed
+2028
-421
No files matched your search
@@ -110,7 +110,7 @@ function readProxyDimensionParam(url: URL, key: 'width' | 'height'): number | un
|
||||
return resolveProxyDimension(Number(raw));
|
||||
}
|
||||
|
||||
function carriedProxyDimensions(proxyURL: string): {width?: number; height?: number} | undefined {
|
||||
function proxyUrlDimensions(proxyURL: string): {width?: number; height?: number} | undefined {
|
||||
let parsed: URL;
|
||||
try {
|
||||
parsed = new URL(proxyURL);
|
||||
@@ -124,7 +124,7 @@ function carriedProxyDimensions(proxyURL: string): {width?: number; height?: num
|
||||
}
|
||||
|
||||
function variantDimensions(proxyURL: string, width?: number, height?: number): {width?: number; height?: number} {
|
||||
return carriedProxyDimensions(proxyURL) ?? {width, height};
|
||||
return proxyUrlDimensions(proxyURL) ?? {width, height};
|
||||
}
|
||||
|
||||
export function stripMediaProxyParams(proxyURL: string): string {
|
||||
|
||||
Reference in new issue
Block a user