Skip to content

Commit

Permalink
fix: Use computed for SvgWrapper
Browse files Browse the repository at this point in the history
Signed-off-by: Raimund Schlüßler <raimund.schluessler@mailbox.org>
  • Loading branch information
raimund-schluessler committed Sep 22, 2023
1 parent 686b887 commit 2b1d068
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions src/components/NcIconSvgWrapper/NcIconSvgWrapper.vue
Expand Up @@ -113,22 +113,12 @@ export default {
},
},
data() {
return {
cleanSvg: '',
}
},
async beforeMount() {
await this.sanitizeSVG()
},
methods: {
async sanitizeSVG() {
computed: {
cleanSvg() {
if (!this.svg) {
return
}
this.cleanSvg = await DOMPurify.sanitize(this.svg)
return DOMPurify.sanitize(this.svg)
},
},
}
Expand Down

0 comments on commit 2b1d068

Please sign in to comment.