|
@@ -2,7 +2,7 @@
|
|
|
|
|
|
const electron = require('electron')
|
|
|
const v8Util = process.atomBinding('v8_util')
|
|
|
-const {ipcMain} = electron
|
|
|
+const {ipcMain, isPromise} = electron
|
|
|
|
|
|
const objectsRegistry = require('./objects-registry')
|
|
|
|
|
@@ -65,7 +65,7 @@ let valueToMeta = function (sender, value, optimizeSimpleObject = false) {
|
|
|
meta.type = 'error'
|
|
|
} else if (value instanceof Date) {
|
|
|
meta.type = 'date'
|
|
|
- } else if (value.constructor != null && value.constructor.name === 'Promise') {
|
|
|
+ } else if (isPromise(value)) {
|
|
|
meta.type = 'promise'
|
|
|
} else if (value.hasOwnProperty('callee') && value.length != null) {
|
|
|
// Treat the arguments object as array.
|