mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 12:19:20 +00:00
Fixes to image serializations
This commit is contained in:
@@ -276,7 +276,7 @@ function convertOutputMimeToJupyterOutput(mime: string, value: Uint8Array) {
|
||||
if (typeof Buffer !== 'undefined' && typeof Buffer.from === 'function') {
|
||||
return Buffer.from(value).toString('base64');
|
||||
} else {
|
||||
return btoa(value.reduce((s: string, b: number) => s + String.fromCharCode(b), ''));
|
||||
return window.btoa(value.reduce((s: string, b: number) => s + String.fromCharCode(b), ''));
|
||||
}
|
||||
} else if (mime.toLowerCase().includes('json')) {
|
||||
const stringValue = textDecoder.decode(value);
|
||||
|
||||
Reference in New Issue
Block a user