Skip to content

Commit

Permalink
Remove async from copyText function
Browse files Browse the repository at this point in the history
  • Loading branch information
wangbertha committed Dec 4, 2024
1 parent 252e27e commit 6a2e1c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/templates/BuildingDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -665,10 +665,10 @@ export default class BuildingDetails extends Vue {
this.currGraphTitle = (this.graphTitles as any)[this.colToGraph];
}

async copyElementTextToClipboard(id: string) {
copyElementTextToClipboard(id: string) {

Check failure

Code scanning / ESLint

Require explicit return types on functions and class methods Error

Missing return type on function.
try {
const content = document.getElementById(id)!.innerText;

Check warning

Code scanning / ESLint

Disallow non-null assertions using the `!` postfix operator Warning

Forbidden non-null assertion.
await navigator.clipboard.writeText(content);
navigator.clipboard.writeText(content);
}
catch (error) {
console.error(error);
Expand Down

0 comments on commit 6a2e1c9

Please sign in to comment.