Skip to content

Commit

Permalink
fix: copy clipboard should work after recreating token
Browse files Browse the repository at this point in the history
  • Loading branch information
ChengShi-1 committed Nov 7, 2024
1 parent cf7d072 commit 4cedb79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sections/account/api-token-section/ApiTokenSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const ApiTokenSection = ({ repository }: ApiTokenSectionProps) => {
}

const copyToClipboard = () => {
navigator.clipboard.writeText(apiTokenInfo.apiToken).catch(
navigator.clipboard.writeText(currentApiTokenInfo?.apiToken ?? '').catch(
/* istanbul ignore next */ (error) => {
console.error('Failed to copy text:', error)
}
Expand Down

0 comments on commit 4cedb79

Please sign in to comment.