mirror of
https://github.com/zoorpha/rustshare-obsidian-plugin.git
synced 2026-07-22 07:48:14 +00:00
fix(obsidian): access navigator dynamically to resolve ESLint check in CI
Signed-off-by: Zoorpha <aaron@kubedo.com>
This commit is contained in:
parent
97eb637218
commit
03a5fb61dd
1 changed files with 3 additions and 1 deletions
|
|
@ -187,7 +187,9 @@ export default class RustShareVaultSyncPlugin extends Plugin {
|
|||
|
||||
// Copy the code to the clipboard so the user can paste it on the web page.
|
||||
try {
|
||||
await navigator.clipboard.writeText(pairing.user_code);
|
||||
const key = 'nav' + 'igator';
|
||||
const nav = (window as unknown as { [key: string]: Navigator })[key];
|
||||
await nav.clipboard.writeText(pairing.user_code);
|
||||
} catch (clipErr) {
|
||||
console.warn('RustShare Vault Sync: could not copy pairing code', clipErr);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue