mirror of
https://github.com/docmost/docmost.git
synced 2026-05-17 06:44:05 +08:00
fix(deps): package updates (#2041)
* update * overrides * override * fix page update mutation * fix * cleanup * loader * fix excalidraw package * override * fix regex
This commit is contained in:
@@ -94,6 +94,12 @@ export function getPageIcon(icon: string, size = 18): string | ReactNode {
|
||||
);
|
||||
}
|
||||
|
||||
export const normalizeUrl = (url: string): string => {
|
||||
if (!url) return url;
|
||||
if (url.startsWith("/") || /^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(url)) return url;
|
||||
return `https://${url}`;
|
||||
};
|
||||
|
||||
export function castToBoolean(value: unknown): boolean {
|
||||
if (value == null) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user