Skip to content

Commit

Permalink
fix exist property
Browse files Browse the repository at this point in the history
  • Loading branch information
clairton committed Dec 9, 2024
1 parent 4fb1280 commit 33cad95
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "unoapi-cloud",
"version": "1.21.11",
"version": "1.21.12",
"description": "Unoapi Cloud",
"exports": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions src/services/data_store_file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,8 @@ const dataStoreFile = async (phone: string, config: Config): Promise<DataStore>
}
}
const result = results && results[0]
const test = result && result.exists && result.jid
logger.debug(`${phoneOrJid} found onWhatsApp exists: ${result.exists} jid: ${result.jid} test: ${test}`)
const test = result && result?.exists && result?.jid
logger.debug(`${phoneOrJid} found onWhatsApp exists: ${result?.exists} jid: ${result?.jid} test: ${test}`)
if (test) {
logger.debug(`${phoneOrJid} exists on WhatsApp, as jid: ${result.jid}`)
jid = result.jid
Expand Down

0 comments on commit 33cad95

Please sign in to comment.