fix: support copying PNG to clipboard on Safari (#3746)

This commit is contained in:
David Luzar 2022-04-06 14:05:09 +02:00 committed by GitHub
parent 77d789ed8e
commit cb6b7559b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 53 additions and 8 deletions

View file

@ -625,3 +625,15 @@ export const getFrame = () => {
return "iframe";
}
};
export const isPromiseLike = (
value: any,
): value is Promise<ResolutionType<typeof value>> => {
return (
!!value &&
typeof value === "object" &&
"then" in value &&
"catch" in value &&
"finally" in value
);
};