mirror of
https://github.com/penpot/penpot.git
synced 2026-08-20 19:58:49 +00:00
When copying an access token over plain HTTP (non-secure context), the browser does not expose navigator.clipboard, causing to-clipboard to return a rejected Promise. The caller was ignoring the Promise entirely, so the rejection became an unhandled exception that crashed the UI. Fix: chain .then/.catch on the returned Promise so that a successful copy shows the existing success toast and a failure (including insecure-origin) shows an error toast using the existing errors.clipboard-api-unavailable translation key. Co-authored-by: Paperclip <noreply@paperclip.ing> Co-authored-by: Andrey Antukh <niwi@niwi.nz>