FIX: Check if theres a string before triggering the clipboard alert

This commit is contained in:
Marcos Rodriguez Velez 2023-10-24 20:50:53 -04:00
parent 7fb3fff028
commit 431771d1b1
No known key found for this signature in database
GPG key ID: 6030B2F48CCE86D7

View file

@ -25,7 +25,8 @@ const BlueClipboard = () => {
const getClipboardContent = async () => {
const isAllowed = await isReadClipboardAllowed();
if (isAllowed) {
const hasString = (await Clipboard.hasString()) || false;
if (isAllowed && hasString) {
return Clipboard.getString();
} else {
return '';