replaced v-bind directive with shorthand

This commit is contained in:
Roberto Tonino
2020-04-28 20:51:14 +02:00
parent 2178b4fad7
commit 917fa328d3
2 changed files with 59 additions and 57 deletions

View File

@@ -1,8 +1,13 @@
function isValidURL(text) {
if (text.toLowerCase().startsWith('http')) {
if (text.toLowerCase().indexOf('deezer.com') >= 0 || text.toLowerCase().indexOf('open.spotify.com') >= 0)
let lowerCaseText = text.toLowerCase()
if (lowerCaseText.startsWith('http')) {
if (lowerCaseText.indexOf('deezer.com') >= 0 || lowerCaseText.indexOf('open.spotify.com') >= 0) {
return true
} else if (text.toLowerCase().startsWith('spotify:')) return true
}
} else if (lowerCaseText.startsWith('spotify:')) {
return true
}
return false
}