Skip to content

Commit

Permalink
Merge pull request #29 from sauravdas1997/main
Browse files Browse the repository at this point in the history
fix: Handle unpatched console methods
  • Loading branch information
07souravkunda committed Apr 18, 2024
2 parents ea00834 + f5ab686 commit 79ce413
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/utils/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,15 @@ const sessions = {};
console = {};
Object.keys(consoleHolder).forEach(method => {
console[method] = (...args) => {
BSTestOpsPatcher[method](...args);
try {
if (!Object.keys(BSTestOpsPatcher).includes(method)) {
consoleHolder[method](...args);
} else {
BSTestOpsPatcher[method](...args);
}
} catch (error) {
consoleHolder[method](...args);
}
};
});

Expand Down

0 comments on commit 79ce413

Please sign in to comment.