File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -160,7 +160,7 @@ export class DeepnoteCellCopyHandler implements IExtensionSyncActivationService
160160
161161 // Copy all metadata (ID and sortingKey will be generated by onDidChangeNotebookDocument)
162162 if ( cellToCopy . metadata ) {
163- const copiedMetadata = { ... cellToCopy . metadata } ;
163+ const copiedMetadata = structuredClone ( cellToCopy . metadata ) ;
164164 newCell . metadata = copiedMetadata ;
165165 logger . debug ( 'DeepnoteCellCopyHandler: Copying cell with metadata preserved' ) ;
166166 }
@@ -171,7 +171,7 @@ export class DeepnoteCellCopyHandler implements IExtensionSyncActivationService
171171 ( o ) =>
172172 new NotebookCellOutput (
173173 o . items . map ( ( i ) => new NotebookCellOutputItem ( i . data , i . mime ) ) ,
174- o . metadata ? { ... o . metadata } : undefined
174+ o . metadata ? structuredClone ( o . metadata ) : undefined
175175 )
176176 ) ;
177177 }
You can’t perform that action at this time.
0 commit comments