1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-07-13 10:06:23 +02:00

script: prevent JS breaking when logging circular obj. fixes #224

This commit is contained in:
Kushagra Gour
2017-11-09 00:28:44 +05:30
parent d4424bd95b
commit 0aa8f2a5b9

View File

@ -1840,6 +1840,7 @@ globalConsoleContainerEl
'script $1:$2'
);
}
try {
scope.consoleCm.replaceRange(
arg +
' ' +
@ -1847,6 +1848,9 @@ globalConsoleContainerEl
'\n',
{ line: Infinity }
);
} catch (e) {
scope.consoleCm.replaceRange('🌀\n', { line: Infinity });
}
scope.consoleCm.scrollTo(0, Infinity);
logCount++;
});