@@ -84,10 +84,12 @@ export function parseCell(cell: ICell): vscode.NotebookCellData {
8484 ( cell . metadata as IMetadata ) . executionSummary ,
8585 cell . execution_count ?? null
8686 ) ;
87- cellData . executionSummary = {
88- executionOrder : execSummary . executionOrder ?? undefined ,
89- success : execSummary . success ,
90- } ;
87+ if ( execSummary . executionOrder ) {
88+ cellData . executionSummary = {
89+ executionOrder : execSummary . executionOrder ?? undefined ,
90+ success : execSummary . success ,
91+ } ;
92+ }
9193
9294 if ( Array . isArray ( cell . outputs ) ) {
9395 const outputs = cell . outputs . flatMap ( ( out : IOutput ) => {
@@ -148,10 +150,10 @@ export function serializeCell(cell: vscode.NotebookCellData): ICell {
148150 if ( cell . kind === vscode . NotebookCellKind . Code ) {
149151 const exec = cell . executionSummary ?? { } ;
150152 const executionCount = exec . executionOrder ?? null ;
151- const success = exec . success ?? false ;
153+ const success = exec . success ;
152154
153155 const execSummary = new ExecutionSummary ( executionCount , success ) ;
154- const metadata = { ...baseMeta , executionSummary : execSummary . toJSON ( ) } ;
156+ const metadata = executionCount ? { ...baseMeta , executionSummary : execSummary . toJSON ( ) } : { } ;
155157
156158 const outputs : IOutput [ ] = ( cell . outputs || [ ] ) . map ( ( output ) : IOutput => {
157159 const data : IMimeBundle = { } ;
0 commit comments