Simplify TextDecoder call

This commit is contained in:
Rob Lourens 2021-07-21 15:18:04 -07:00
parent 0e6388c47a
commit 2bc4f8f94b

View file

@ -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 {
}