File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -628,14 +628,15 @@ export default {
628
628
runProgram () {
629
629
// POST /program/save
630
630
console .info (" Starting program" );
631
- var code = ' ' ;
631
+ var python_code = ' ' ;
632
632
if (this .$data .activity .editor == ' code' ) {
633
- code = this .$data .code ;
633
+ python_code = this .$data .code ;
634
634
} else if (this .$data .activity .editor == ' blockly' ) {
635
- code = this .$refs .workspace .getProgramCode ();
635
+ let {code, dom_code} = this .$refs .workspace .getProgramData ();
636
+ python_code = code;
636
637
}
637
638
const programName = this .programName != ' ' ? this .programName : ' untitled' ;
638
- this .$coderbot .runProgram (programName, code ).then (() => {
639
+ this .$coderbot .runProgram (programName, python_code ).then (() => {
639
640
this .runtimeDialog = true ;
640
641
setTimeout (() => {
641
642
this .updateExecStatus ();
You can’t perform that action at this time.
0 commit comments