[presentation] Avoiding persisting the result data of presentation snippets
@@ -2244,9 +2244,11 @@ var EditorViewModel = (function() {
hueAnalytics.log('notebook', 'save');
// Remove the result data from the snippets
- // TODO presentation mode too
+ // Also do it for presentation mode
var cp = ko.mapping.toJS(self, NOTEBOOK_MAPPING);
- $.each(cp.snippets, function(index, snippet) {
+ $.each(cp.snippets.concat(Object.keys(cp.presentationSnippets).map(function(key){
+ return cp.presentationSnippets[key];
+ })), function(index, snippet) {
snippet.result.data.length = 0; // snippet.result.clear() does not work for some reason
snippet.result.meta.length = 0;
snippet.result.logs = '';
