Skip to content

Commit 7921d6a

Browse files
committed
stent
1 parent 3fdf6e5 commit 7921d6a

1 file changed

Lines changed: 12 additions & 7 deletions

File tree

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

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1244,13 +1244,17 @@ function executePythonCode(pythonSourceCode,
12441244
// run this at the VERY END after all the dust has settled
12451245

12461246
// do logging at the VERY END after the dust settles ...
1247-
logEvent({type: 'doneExecutingCode',
1248-
appState: getAppState(),
1249-
// enough to reconstruct the ExecutionVisualizer object
1250-
backendDataJSON: JSON.stringify(dataFromBackend), // for easier transport and compression
1251-
frontendOptionsObj: frontendOptionsObj,
1252-
backendOptionsObj: backendOptionsObj,
1253-
});
1247+
// and don't do it for iframe-embed.js since getAppState doesn't
1248+
// work in that case ...
1249+
if (originFrontendJsFile !== 'iframe-embed.js') {
1250+
logEvent({type: 'doneExecutingCode',
1251+
appState: getAppState(),
1252+
// enough to reconstruct the ExecutionVisualizer object
1253+
backendDataJSON: JSON.stringify(dataFromBackend), // for easier transport and compression
1254+
frontendOptionsObj: frontendOptionsObj,
1255+
backendOptionsObj: backendOptionsObj,
1256+
});
1257+
}
12541258
}
12551259

12561260
if (!backendScript) {
@@ -1756,6 +1760,7 @@ display a brief "Thanks!" note]
17561760

17571761
// using socket.io:
17581762
function logEvent(obj) {
1763+
console.log('logEvent', obj);
17591764
if (loggingSocketIO) {
17601765
if (supports_html5_storage()) {
17611766
obj.user_uuid = localStorage.getItem('opt_uuid');

0 commit comments

Comments
 (0)