- } else if (value.parent !== undefined) {
- // Save a reference of the main worker to communicate with it
- // This will be received once
- this.mainWorker = value.parent
- } else if (value.kill !== undefined) {
- // Here is time to kill this worker, just clearing the interval
- if (this.aliveInterval != null) clearInterval(this.aliveInterval)
+ } else if (message.parent != null) {
+ // Main worker reference message received
+ this.mainWorker = message.parent
+ } else if (message.kill != null) {
+ // Kill message received
+ this.aliveInterval != null && clearInterval(this.aliveInterval)