diff --git a/js/OnlineIDE.js b/js/OnlineIDE.js index 0c4a8ec..1df1b68 100644 --- a/js/OnlineIDE.js +++ b/js/OnlineIDE.js @@ -361,7 +361,10 @@ function onExecuteResult(obj) { const executeResultTitleEl = $("#executeResultTitle"); const data = obj; var sytleTail = "未知格式"; - if (data.result instanceof Object) { + if (data.result==undefined) { + styleTail = "Undefined"; + data.result = ""; + } else if (data.result instanceof Object) { sytleTail = "JSON格式"; data.result =JSON.stringify(data.result); } else if (typeof data.result == 'string') {