We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ba6576d commit afdb5ecCopy full SHA for afdb5ec
1 file changed
src/vs/base/common/marshalling.ts
@@ -5,6 +5,7 @@
5
6
import { URI } from 'vs/base/common/uri';
7
import { regExpFlags } from 'vs/base/common/strings';
8
+import { VSBuffer } from 'vs/base/common/buffer';
9
10
export function stringify(obj: any): string {
11
return JSON.stringify(obj, replacer);
@@ -44,6 +45,13 @@ export function revive(obj: any, depth = 0): any {
44
45
case 2: return new RegExp(obj.source, obj.flags);
46
}
47
48
+ if (
49
+ obj instanceof VSBuffer
50
+ || obj instanceof Uint8Array
51
+ ) {
52
+ return obj;
53
+ }
54
+
55
// walk object (or array)
56
for (let key in obj) {
57
if (Object.hasOwnProperty.call(obj, key)) {
0 commit comments