-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
I am going to explain the problem by following demonstration:
--------background module
const cpuIntensive = {
doStuff(){
let temp = [];
for(var x=0; x<10; x++)
temp.push( new MyClass(x) )
return temp
}
}
class MyClass{
constructor(_path){
this.prop_1= _path
this.prop_2 = "/index"
}
someMethod() {
return this.prop_1+ this.prop_2
}
}
--------foreground module
const foreground = require('electron-process').foreground;
const test = foreground.getModule(require('./cpuIntensive'));
test.readProfiles()
.then((data)=>{
for(var x in data)
console.log( data[x].someMethod() );
})
.catch((reason) => console.error(reason));
error=> TypeError: data[x].someMethod is not a function(…)
althoughdata[x].prop_1 and data[x].prop_2 both are there! I am wonder if this has something to do with the electron-process or for example objectHash?
Metadata
Metadata
Assignees
Labels
No labels