From a034f5db0d6284ffe0f4baa18da0525c67acf0ea Mon Sep 17 00:00:00 2001 From: Milan Burda Date: Mon, 4 Nov 2019 23:35:57 +0100 Subject: [PATCH] refactor: add Error to isSerializableObject() (#20886) --- lib/common/remote/type-utils.ts | 1 + lib/renderer/api/remote.js | 5 ----- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/common/remote/type-utils.ts b/lib/common/remote/type-utils.ts index 58a57765fa34..e90c64fcc4ac 100644 --- a/lib/common/remote/type-utils.ts +++ b/lib/common/remote/type-utils.ts @@ -16,6 +16,7 @@ const serializableTypes = [ Number, String, Date, + Error, RegExp, ArrayBuffer ] diff --git a/lib/renderer/api/remote.js b/lib/renderer/api/remote.js index 53087896d908..fca80978f6af 100644 --- a/lib/renderer/api/remote.js +++ b/lib/renderer/api/remote.js @@ -64,11 +64,6 @@ function wrapArgs (args, visited = new Set()) { type: 'remote-object', id: v8Util.getHiddenValue(value, 'atomId') } - } else if (value instanceof Error) { - return { - type: 'value', - value - } } const meta = {