From ec12b3538f42c8596c4e700ae2284a02b4d7791e Mon Sep 17 00:00:00 2001 From: lawvs <18554747+lawvs@users.noreply.github.com> Date: Tue, 19 Nov 2024 15:20:03 +0800 Subject: [PATCH] fix: omit cacheDimensions from img attributes in MediaImpl --- apps/renderer/src/components/ui/media.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/renderer/src/components/ui/media.tsx b/apps/renderer/src/components/ui/media.tsx index 756815bfd..2258025b9 100644 --- a/apps/renderer/src/components/ui/media.tsx +++ b/apps/renderer/src/components/ui/media.tsx @@ -1,5 +1,6 @@ import { nextFrame } from "@follow/utils/dom" import { cn } from "@follow/utils/utils" +import { omit } from "es-toolkit/compat" import { useForceUpdate } from "framer-motion" import type { FC, ImgHTMLAttributes, VideoHTMLAttributes } from "react" import { createContext, memo, useContext, useMemo, useState } from "react" @@ -175,7 +176,7 @@ const MediaImpl: FC = ({ )} + {...(omit(rest, "cacheDimensions") as ImgHTMLAttributes)} onError={errorHandle} className={cn( "size-full object-contain",