mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
small fix in logic
This commit is contained in:
parent
47e556e91b
commit
834ad7365b
|
@ -135,7 +135,9 @@ function buildAttachment(b64: string, cell: vscode.NotebookCell, filename: strin
|
|||
const objEntries = Object.entries(startingAttachments[tempFilename]);
|
||||
if (objEntries.length) { // check that mime:b64 are present
|
||||
const [, attachmentb64] = objEntries[0];
|
||||
if (attachmentb64 !== b64) { // append a "-#" here. same name, diff data. this matches jupyter behavior
|
||||
if (attachmentb64 === b64) { // checking if filename can be reused, based on camparison of image data
|
||||
break;
|
||||
} else {
|
||||
tempFilename = filename.concat(`-${appendValue}`) + filetype;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue