mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 12:19:20 +00:00
Simplify TextDecoder call
This commit is contained in:
@@ -13,7 +13,7 @@ export class NotebookSerializer implements vscode.NotebookSerializer {
|
||||
public deserializeNotebook(content: Uint8Array, _token: vscode.CancellationToken): vscode.NotebookData {
|
||||
let contents = '';
|
||||
try {
|
||||
contents = new TextDecoder().decode(content.buffer.slice(content.byteOffset, content.byteOffset + content.byteLength));
|
||||
contents = new TextDecoder().decode(content);
|
||||
} catch {
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user