Skip to content

Commit

Permalink
Update EvalPlus.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Mistium authored Nov 30, 2024
1 parent 92ab02e commit cb5f8b9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions featured/EvalPlus.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,14 +231,13 @@
try {
if (!this.enabled) return null;
this.consoleOutput = [];
const originalConsoleLog = console.log;
const self = this;

console.log = function (...args) {
self.consoleOutput.push(args.join(' '));
};
eval(CODE)
console.log = originalConsoleLog
delete console.log
return this.consoleOutput.join('\n');
} catch (error) {
console.error("Error:", error);
Expand Down

0 comments on commit cb5f8b9

Please sign in to comment.