1
0
Fork 0
mirror of https://github.com/anyproto/anytype-ts.git synced 2025-06-08 05:57:02 +09:00

pipe fixes

This commit is contained in:
Razor 2019-09-20 15:45:28 +03:00
parent 49774f8188
commit 0a685d1941
3 changed files with 17 additions and 15 deletions

View file

@ -1,9 +1,7 @@
global.btoa = require('btoa');
global.atob = require('atob');
const electron = require('electron');
const { app, BrowserWindow, ipcMain } = require('electron');
const spawn = require('child_process').spawn;
const protobuf = require('protobufjs');
const Pipe = require('./electron/pipe');
function createWindow () {
@ -31,8 +29,12 @@ function createWindow () {
console.log('appLoaded');
pipe = new Pipe((event) => {
console.log('EVENT', event);
win.webContents.send('pipeEvent', event);
try {
console.log('EVENT', typeof(event), event.constructor.name, event);
win.webContents.send('pipeEvent', event);
} catch (e) {
console.log(e);
};
});
pipe.start();
});