This commit is contained in:
2024-12-05 00:25:26 +08:00
parent 0460443a9d
commit 86fe107ec2

View File

@@ -1,8 +1,8 @@
import { useAppSelector } from "@/store";
export function useContextFix(content: string) {
export function useContextFix(content?: string) {
const { s3Url } = useAppSelector((state) => state.options);
return content.replace(
return content?.replace(
/https?:\/\/(?:minio-hdd)\.yoshino-s\.(?:online|xyz)\//g,
s3Url,
);