浏览代码

Merge branch 'fix-return-conv' of LInE/iVProg into master

GitAdmin 1 年之前
父节点
当前提交
d9e9b0b843
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      js/util/parseFromVisual.js

+ 4 - 1
js/util/parseFromVisual.js

@@ -86,7 +86,10 @@ function switchWalker (switchCommand) {
  * @param {Commands.Return} returnCommand
  * */
 function returnWalker (returnCommand) {
-  const expression = expressionWalker(returnCommand.expression);
+  let expression = null;
+  if (returnCommand.expression !== null) {
+    expression = expressionWalker(returnCommand.expression);
+  }
   return {
     type: "return",
     expression,