function Scratch3ProcedureBlocks(runtime) {
    /**
     * The runtime instantiating this block package.
     * @type {Runtime}
     */
    this.runtime = runtime;
}

/**
 * Retrieve the block primitives implemented by this package.
 * @return {Object.<string, Function>} Mapping of opcode to Function.
 */
Scratch3ProcedureBlocks.prototype.getPrimitives = function() {
    return {
        'procedures_defnoreturn': this.defNoReturn,
        'procedures_callnoreturn': this.callNoReturn,
        'procedures_defreturn': this.defReturn,
        'procedures_callreturn': this.callReturn,
        'procedures_report': this.report
    };
};

Scratch3ProcedureBlocks.prototype.defNoReturn = function () {
    // No-op: execute the blocks.
};

Scratch3ProcedureBlocks.prototype.defReturn = function (args, util) {
    // No-op: execute the blocks.
    util.stackFrame.REPORT = args.RETURN;
};

Scratch3ProcedureBlocks.prototype.callNoReturn = function (args, util) {
    if (!util.stackFrame.executed) {
        var procedureName = args.mutation.name;
        util.stackFrame.executed = true;
        util.startProcedure(procedureName);
    }
};

Scratch3ProcedureBlocks.prototype.callReturn = function (args, util) {
    var proc = null;
    if (!util.stackFrame.executed) {
        var procedureName = args.mutation.name;
        util.stackFrame.executed = true;
        proc = util.startProcedure(procedureName);
    }
    var procReturn = null;
    if (!util.stackFrame.executedInFrame) {
        util.stackFrame.executedInFrame = true;
        if (proc) {
            procReturn = proc.executionContent.REPORT;
        }
    } else {
        util.stackFrame.executedInFrame = false;
        util.yieldFrame();
    }
    return procReturn;
};

Scratch3ProcedureBlocks.prototype.report = function (args, util) {
    // No-op: execute the blocks.
    util.stackFrame.REPORT = args.VALUE;
};

module.exports = Scratch3ProcedureBlocks;

@@ -1604,16 +1604,64 @@
 REPORT;%0A
+        %7D else %7B%0A            return procReturn;%0A
         
@@ -1757,39 +1757,16 @@
 ;%0A    %7D%0A
-    return procReturn;%0A
 %7D;%0A%0AScra

Fix Return