Fix Bug when CodeMirror return function object

This commit is contained in:
hangaebal
2016-05-31 11:21:17 +09:00
parent 0e10970198
commit 856874a727

View File

@ -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);
} }