From 90ba844fba3e04f66ffe01f625ce30847c24f4b5 Mon Sep 17 00:00:00 2001 From: Guillermo Vaya Date: Tue, 27 Jul 2021 11:22:10 +0200 Subject: [PATCH] remove electron-log from preload --- src/main/preload/mattermost.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/preload/mattermost.js b/src/main/preload/mattermost.js index d86302c3..4898598b 100644 --- a/src/main/preload/mattermost.js +++ b/src/main/preload/mattermost.js @@ -7,21 +7,21 @@ /* eslint-disable no-magic-numbers */ import {ipcRenderer, webFrame} from 'electron'; -import log from 'electron-log'; +// I've filed an issue in electron-log https://github.com/megahertz/electron-log/issues/267 +// we'll be able to use it again if there is a workaround for the 'os' import +//import log from 'electron-log'; import {NOTIFY_MENTION, IS_UNREAD, UNREAD_RESULT, SESSION_EXPIRED, SET_VIEW_NAME, REACT_APP_INITIALIZED, USER_ACTIVITY_UPDATE, CLOSE_TEAMS_DROPDOWN} from 'common/communication'; const UNREAD_COUNT_INTERVAL = 1000; const CLEAR_CACHE_INTERVAL = 6 * 60 * 60 * 1000; // 6 hours -Reflect.deleteProperty(global.Buffer); // http://electron.atom.io/docs/tutorial/security/#buffer-global - let appVersion; let appName; let sessionExpired; let viewName; -log.info('Initializing preload'); +console.log('Preload initialized'); ipcRenderer.invoke('get-app-version').then(({name, version}) => { appVersion = version;