Browse Source

fix ipc.js for prod

master
Gaëtan Renaudeau 7 years ago
parent
commit
4a292f1e97
  1. 2
      src/helpers/ipc.js

2
src/helpers/ipc.js

@ -1,5 +1,4 @@
// @flow
import { ipcRenderer } from 'electron'
import { Observable } from 'rxjs'
import uuidv4 from 'uuid/v4'
@ -63,6 +62,7 @@ export class Command<In, A> {
* const res = await send(data).toPromise()
*/
send(data: In): Observable<A> {
const { ipcRenderer } = require('electron')
return Observable.create(o => {
const { channel, type, id } = this
const requestId: string = uuidv4()

Loading…
Cancel
Save