Skip to content

Commit

Permalink
feat: simplify computed property
Browse files Browse the repository at this point in the history
  • Loading branch information
AlejandroAkbal committed Sep 5, 2020
1 parent a2132ad commit 4b55628
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions components/pages/posts/content/PostSource.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,7 @@ export default {
computed: {
isUrl() {
try {
// eslint-disable-next-line no-new
new URL(this.source[0])
return true
} catch {
return false
}
return this.source[0].startsWith('http', 'www')
},
sourceText() {
Expand Down

0 comments on commit 4b55628

Please sign in to comment.