Skip to content

Commit 35882be

Browse files
committed
bah
1 parent 98b6d11 commit 35882be

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎v3/js/opt-frontend-common.js‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1162,7 +1162,9 @@ function executePythonCode(pythonSourceCode,
11621162
snapshotCodeDiff(); // do ONE MORE snapshot before we execute, or else
11631163
// we'll miss a diff if the user hits Visualize Execution
11641164
// very shortly after finishing coding
1165-
deltaObj.executeTime = new Date().getTime();
1165+
if (deltaObj) {
1166+
deltaObj.executeTime = new Date().getTime();
1167+
}
11661168

11671169
// if you're in display mode, kick back into edit mode before
11681170
// executing or else the display might not refresh properly ... ugh
@@ -1177,7 +1179,7 @@ function executePythonCode(pythonSourceCode,
11771179
raw_input_json: rawInputLst.length > 0 ? JSON.stringify(rawInputLst) : '',
11781180
options_json: JSON.stringify(backendOptionsObj),
11791181
// if we don't have any deltas, then don't bother sending deltaObj:
1180-
diffs_json: deltaObj.deltas.length > 0 ? JSON.stringify(deltaObj) : null},
1182+
diffs_json: deltaObj && (deltaObj.deltas.length > 0) ? JSON.stringify(deltaObj) : null},
11811183
function(dataFromBackend) {
11821184
var trace = dataFromBackend.trace;
11831185

0 commit comments

Comments
 (0)