Browse Source

refactor: add Error to isSerializableObject() (#20886)

Milan Burda 5 years ago
parent
commit
a034f5db0d
2 changed files with 1 additions and 5 deletions
  1. 1 0
      lib/common/remote/type-utils.ts
  2. 0 5
      lib/renderer/api/remote.js

+ 1 - 0
lib/common/remote/type-utils.ts

@@ -16,6 +16,7 @@ const serializableTypes = [
   Number,
   String,
   Date,
+  Error,
   RegExp,
   ArrayBuffer
 ]

+ 0 - 5
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 = {