Skip to content

Self-hosted, plugin-based server management.

fix: rdp fails with readText undefined error

LukeGuseaa758effe69
diff --git a/src/ui/desktop/apps/features/guacamole/GuacamoleDisplay.tsx b/src/ui/desktop/apps/features/guacamole/GuacamoleDisplay.tsx
index 6a40613d0..6da710ab3 100644
--- a/src/ui/desktop/apps/features/guacamole/GuacamoleDisplay.tsx
+++ b/src/ui/desktop/apps/features/guacamole/GuacamoleDisplay.tsx
@@ -383,7 +383,7 @@ export const GuacamoleDisplay = forwardRef<
data += text;
};
reader.onend = () => {
- navigator.clipboard.writeText(data).catch(() => {});
+ navigator.clipboard?.writeText?.(data).catch(() => {});
};
}
};
@@ -502,7 +502,7 @@ export const GuacamoleDisplay = forwardRef<
const syncClipboard = useCallback(() => {
const client = clientRef.current;
- if (!client) return;
+ if (!client || !navigator.clipboard?.readText) return;
navigator.clipboard
.readText()
.then((text) => {