mirror of
https://github.com/hanzoai/sign.git
synced 2026-10-21 01:21:51 +00:00
`Boolean(typeof ClipboardItem && navigator.clipboard.write)` looks like a check for ClipboardItem, but `typeof` always yields a non-empty string, so the expression was always navigator.clipboard.write — ESLint 10's no-constant-binary-expression says so. The check now says only that, which is what it has always evaluated to, and a comment records why that is enough: without ClipboardItem, handleClipboardApiCopy throws inside its own try and falls back to writeText. The ternary used as a statement becomes an if, as typescript-eslint 8's no-unused-expressions asks. Co-authored-by: Hanzo Dev <[email protected]>