Skip to content

Commit b4d391b

Browse files
Fixed two minor bugs in ngpvan-optout.
1 parent 8a0a398 commit b4d391b

File tree

1 file changed

+2
-2
lines changed
  • src/extensions/message-handlers/ngpvan-optout

1 file changed

+2
-2
lines changed

src/extensions/message-handlers/ngpvan-optout/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export const available = organization =>
2323
(hasConfig("NGP_VAN_API_KEY", organization) ||
2424
hasConfig("NGP_VAN_API_KEY_ENCRYPTED", organization)) &&
2525
hasConfig("NGP_VAN_APP_NAME", organization) &&
26-
getConfig("MESSAGE_HANDLERS").inlcudes("auto-optout");
26+
getConfig("MESSAGE_HANDLERS", organization).indexOf("auto-optout") !== -1;
2727

2828
/* Sends a request to VAN to place an opt out tag to an individual.
2929
*/
@@ -39,7 +39,7 @@ export const postMessageSave = async ({
3939
// Checking for vanID in contact
4040
try {
4141
const c = JSON.stringify(contact.customFields);
42-
if ("vanId" in c) return {}
42+
if (c?.VanID === undefined) return {}
4343
} catch (exception) {
4444
console.log("message-handlers | ngpvan-optout ERROR", exception);
4545
}

0 commit comments

Comments
 (0)