Merge pull request #8864 from hangaebal/fix/when-codemirror-return-function-object
Fix Bug when CodeMirror return function object
This commit is contained in:
@ -39,6 +39,9 @@ window.common = (function(global) {
|
|||||||
codeOutput.setSize('100%', '100%');
|
codeOutput.setSize('100%', '100%');
|
||||||
|
|
||||||
common.updateOutputDisplay = function updateOutputDisplay(str = '') {
|
common.updateOutputDisplay = function updateOutputDisplay(str = '') {
|
||||||
|
if (typeof str === 'function') {
|
||||||
|
str = str.toString();
|
||||||
|
}
|
||||||
if (typeof str !== 'string') {
|
if (typeof str !== 'string') {
|
||||||
str = JSON.stringify(str);
|
str = JSON.stringify(str);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user