提交 2bc4f8f9 编写于 作者: R Rob Lourens

Simplify TextDecoder call

上级 0e6388c4
......@@ -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 {
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册