Skip to content
This repository was archived by the owner on Jun 14, 2021. It is now read-only.

Commit 51ae0aa

Browse files
committed
fix: !{} === false
1 parent 7564309 commit 51ae0aa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

workers/app.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const CryptoJS = require('crypto-js')
22
const Base64 = require('js-base64').Base64
3-
const oAuth = {} // || require('./config') // Needed if not using vercel
4-
const aesPassword = oAuth.aesPassword || require('./../vercel/config').password
3+
const oAuth = null // || require('./config') // Needed if not using vercel
4+
const aesPassword = (oAuth && oAuth.aesPassword) || require('./../vercel/config').password
55

66
let accessToken, oAuthToken = {}
77

@@ -81,7 +81,7 @@ class googleDrive {
8181
}
8282

8383
async requestOption(headers = {}, method = 'GET') {
84-
headers['authorization'] = 'Bearer ' + ((!oAuth && accessToken) || await this.accessToken())
84+
headers['authorization'] = 'Bearer ' + ((oAuth === null && accessToken) || await this.accessToken())
8585

8686
return {
8787
method,

0 commit comments

Comments
 (0)