Skip to content

Commit

Permalink
Added missing brackets
Browse files Browse the repository at this point in the history
  • Loading branch information
Redjaw committed Sep 8, 2023
1 parent 2eb9c2c commit 8977420
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -179,17 +179,18 @@ export default defineComponent({
captureScreenshot(widget) {
domtoimage
.toPng(document.getElementById(`widget${widget.id}`))
.then( (dataUrl)=>{
.then((dataUrl) => {
const link = document.createElement('a')
link.download = `${widget.type}-widget.png`
link.href = dataUrl
link.click()
})
.catch((error)=> {
.catch((error) => {
this.setError({
title: this.$t('common.toast.errorTitle'),
msg: `${this.$t('dashboard.errors.screenshotError')}: ${error}`,
msg: `${this.$t('dashboard.errors.screenshotError')}: ${error}`
})
})
},
loadMenuItems() {
this.items = [
Expand Down

0 comments on commit 8977420

Please sign in to comment.