clipper: hide clip preview button when there's no clip data (#3772)

This commit is contained in:
Muhammad Ali
2023-11-21 08:18:28 +05:00
committed by GitHub
parent 0c16bfb5ff
commit 576fe78e33

View File

@@ -306,7 +306,7 @@ export function Main() {
</Button> </Button>
))} ))}
{clipData && !isClipping && ( {clipData && clipData.data && !isClipping && (
<Text <Text
variant="body" variant="body"
sx={{ sx={{
@@ -322,7 +322,6 @@ export function Main() {
} }
}} }}
onClick={async () => { onClick={async () => {
if (!clipData) return;
const winUrl = URL.createObjectURL( const winUrl = URL.createObjectURL(
new Blob(["\ufeff", clipData.data], { type: "text/html" }) new Blob(["\ufeff", clipData.data], { type: "text/html" })
); );