mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 12:19:20 +00:00
don't clean attachments for a cell that is removed
This commit is contained in:
@@ -187,7 +187,7 @@ export class AttachmentCleaner implements vscode.CodeActionProvider {
|
||||
}
|
||||
}
|
||||
|
||||
if (!objectEquals(markdownAttachmentsInUse, cell.metadata.attachments)) {
|
||||
if (cell.index > -1 && !objectEquals(markdownAttachmentsInUse, cell.metadata.attachments)) {
|
||||
const updateMetadata: { [key: string]: any } = deepClone(cell.metadata);
|
||||
updateMetadata.attachments = markdownAttachmentsInUse;
|
||||
const metadataEdit = vscode.NotebookEdit.updateCellMetadata(cell.index, updateMetadata);
|
||||
|
||||
Reference in New Issue
Block a user