Skip to content

Commit

Permalink
checking if interaction logs exist before parsing them
Browse files Browse the repository at this point in the history
  • Loading branch information
jbigel committed Feb 6, 2025
1 parent d5e1b25 commit 70a0946
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cypress/support/cypress-support/src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -609,9 +609,11 @@ function subscribeResults(data, metaData) {
* interactionResults("{"method": "account.id", "response": "123", "tt": 12}")
**/
function interactionResults(interactionLog) {
interactionLog = JSON.parse(interactionLog);
if (interactionLog && interactionLog.hasOwnProperty(CONSTANTS.METHOD)) {
getEnvVariable(CONSTANTS.FB_INTERACTIONLOGS).addLog(interactionLog);
if (interactionLog) {
interactionLog = JSON.parse(interactionLog);
if (interactionLog.hasOwnProperty(CONSTANTS.METHOD)) {
getEnvVariable(CONSTANTS.FB_INTERACTIONLOGS).addLog(interactionLog);
}
}
}

Expand Down

0 comments on commit 70a0946

Please sign in to comment.