Skip to content

Commit dfbbd70

Browse files
authored
Remove redundant regex for token check (sindresorhus#249)
1 parent 85513a3 commit dfbbd70

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

source/lib/api.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ export async function getParsedUrl(endpoint, params) {
4141
export async function getHeaders() {
4242
const {token} = await optionsStorage.getAll();
4343

44-
/// if (!(/[a-z\d]{40}/.test(token))) {
45-
// throw new Error('missing token');
46-
// }
44+
if (!token) {
45+
throw new Error('missing token');
46+
}
4747

4848
return {
4949
/* eslint-disable quote-props */

0 commit comments

Comments
 (0)