Merge pull request #8864 from hangaebal/fix/when-codemirror-return-function-object

Fix Bug when CodeMirror return function object
This commit is contained in:
Logan Tegman
2016-05-31 21:26:53 -07:00

View File

@ -39,6 +39,9 @@ window.common = (function(global) {
codeOutput.setSize('100%', '100%');
common.updateOutputDisplay = function updateOutputDisplay(str = '') {
if (typeof str === 'function') {
str = str.toString();
}
if (typeof str !== 'string') {
str = JSON.stringify(str);
}