Browse Source

fix: lint error

pull/7173/head
Ramesh Mane 7 months ago
parent
commit
9ed6a1b4ce
  1. 4
      packages/nc-gui/composables/usePaste.ts

4
packages/nc-gui/composables/usePaste.ts

@ -1,4 +1,4 @@
import { useI18n, message } from '#imports' import { message, useI18n } from '#imports'
export const usePaste = () => { export const usePaste = () => {
const { t } = useI18n() const { t } = useI18n()
@ -6,7 +6,7 @@ export const usePaste = () => {
const paste = async (): Promise<boolean> => { const paste = async (): Promise<boolean> => {
try { try {
// Check if the Clipboard API is supported // Check if the Clipboard API is supported
if (!navigator.clipboard) throw new Error() if (!navigator.clipboard) throw new Error(t('msg.error.pasteFromClipboardError'))
// Read text from the clipboard // Read text from the clipboard
const clipboardText = await navigator.clipboard.readText() const clipboardText = await navigator.clipboard.readText()

Loading…
Cancel
Save