mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
don't clean attachments for a cell that is removed
This commit is contained in:
parent
0d4e84d528
commit
888fd835ca
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue