mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
Simplify TextDecoder call
This commit is contained in:
parent
0e6388c47a
commit
2bc4f8f94b
|
@ -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 {
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue