fix: rdp fails with readText undefined error

This commit is contained in:
LukeGus
2026-05-13 01:06:34 -05:00
parent 557a789a6c
commit eaa758effe
@@ -383,7 +383,7 @@ export const GuacamoleDisplay = forwardRef<
data += text; data += text;
}; };
reader.onend = () => { reader.onend = () => {
navigator.clipboard.writeText(data).catch(() => {}); navigator.clipboard?.writeText?.(data).catch(() => {});
}; };
} }
}; };
@@ -502,7 +502,7 @@ export const GuacamoleDisplay = forwardRef<
const syncClipboard = useCallback(() => { const syncClipboard = useCallback(() => {
const client = clientRef.current; const client = clientRef.current;
if (!client) return; if (!client || !navigator.clipboard?.readText) return;
navigator.clipboard navigator.clipboard
.readText() .readText()
.then((text) => { .then((text) => {