Skip to content

Commit f00fde0

Browse files
authored
1 parent b726711 commit f00fde0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

extensions/ipynb/src/notebookImagePaste.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ function encodeBase64(buffer: Uint8Array, padded = true, urlSafe = false) {
124124
}
125125

126126
function buildMetadata(b64: string, cell: vscode.NotebookCell, filename: string, filetype: string, startingAttachments: any): { [key: string]: any } {
127-
const outputMetadata: { [key: string]: any } = cell.metadata;
127+
const outputMetadata = { ...cell.metadata };
128128
const customField = cell.metadata.custom;
129129
if (!customField) {
130130
return { 'custom': { 'attachments': { [filename]: { 'image/png': b64 } } } };

src/vscode-dts/vscode.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13025,7 +13025,7 @@ declare module 'vscode' {
1302513025
/**
1302613026
* The metadata of this cell. Can be anything but must be JSON-stringifyable.
1302713027
*/
13028-
readonly metadata: { [key: string]: any };
13028+
readonly metadata: { readonly [key: string]: any };
1302913029

1303013030
/**
1303113031
* The outputs of this cell.

0 commit comments

Comments
 (0)