mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-25 18:26:05 +08:00
refactor(editor): cleanup ts-expect-error (#9369)
This commit is contained in:
@@ -242,7 +242,7 @@ export async function copyImageBlob(
|
||||
}
|
||||
|
||||
try {
|
||||
// @ts-expect-error FIXME: ts error
|
||||
// @ts-expect-error FIXME: BS-2239
|
||||
if (window.apis?.clipboard?.copyAsImageFromString) {
|
||||
const dataURL = await convertToString(blob);
|
||||
if (!dataURL)
|
||||
@@ -250,7 +250,7 @@ export async function copyImageBlob(
|
||||
ErrorCode.DefaultRuntimeError,
|
||||
'Cant convert a blob to data URL.'
|
||||
);
|
||||
// @ts-expect-error FIXME: ts error
|
||||
// @ts-expect-error FIXME: BS-2239
|
||||
await window.apis.clipboard?.copyAsImageFromString(dataURL);
|
||||
} else {
|
||||
// DOMException: Type image/jpeg not supported on write.
|
||||
|
||||
Reference in New Issue
Block a user