Skip to content

Commit 8b88881

Browse files
committed
fix the tests
1 parent df330bc commit 8b88881

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/notebooks/deepnote/deepnoteDataConverter.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,9 @@ export class DeepnoteDataConverter {
8787
// Outputs are managed by VS Code natively, not stored in the pocket
8888
// Preserve outputs when they exist (including newly produced outputs)
8989
// Only set if not already set to avoid overwriting converter-managed outputs
90-
if (cell.outputs && !block.outputs) {
90+
// Only set if the cell actually has outputs (non-empty array) or if the block originally had outputs
91+
const hadOutputs = cell.metadata?.__hadOutputs;
92+
if (cell.outputs && !block.outputs && (cell.outputs.length > 0 || hadOutputs)) {
9193
block.outputs = this.transformOutputsForDeepnote(cell.outputs);
9294
}
9395

0 commit comments

Comments
 (0)