Skip to content

Commit 90cfe7c

Browse files
committed
Fix await token exist
1 parent fe609fd commit 90cfe7c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎JavaScript/storage.js‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ const safePath = (fn) => async (token, ...args) => {
2020
if (!fileName.startsWith(PATH)) {
2121
throw new Error('Invalid session token');
2222
}
23-
if (!exist(fileName)) {
23+
const tokenExist = await exist(fileName);
24+
if (!tokenExist) {
2425
console.log('Token not found!');
2526
throw new Error('Invalid session token');
2627
}

0 commit comments

Comments
 (0)