Use more conventional regex format.

This commit is contained in:
Kavin 2022-07-22 18:57:51 +05:30
parent c92eb10a86
commit 69787ded3b
No known key found for this signature in database
GPG Key ID: 49451E4482CC5BCD

View File

@ -64,8 +64,9 @@ export default {
},
isPipedPlaylist: _this => {
// regex to determine whether it's a Piped plalylist
const regex = new RegExp("[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}");
return regex.test(_this.$route.query.list);
return /[\da-fA-F]{8}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{12}/.test(
_this.$route.query.list,
);
},
},
mounted() {