diff --git a/desktop/app.js b/desktop/app.js index c1335deb2..38e0137c8 100644 --- a/desktop/app.js +++ b/desktop/app.js @@ -123,8 +123,8 @@ module.exports = function main() { mainWindow.setMenuBarVisibility(!autoHideMenuBar); }); - ipcMain.on('wpLogin', function (event, url) { - shell.openExternal(url); + ipcMain.on('wpLogin', function (event, wpLoginUrl) { + shell.openExternal(wpLoginUrl); }); ipcMain.on('importNotes', function (event, filePath) { diff --git a/lib/boot.ts b/lib/boot.ts index 0fb0216a2..bd675b121 100644 --- a/lib/boot.ts +++ b/lib/boot.ts @@ -12,7 +12,7 @@ import { boot as bootLoggingOut } from './logging-out'; const config = getConfig(); const clearStorage = (): Promise => - new Promise((resolve) => { + new Promise((resolveStorage) => { localStorage.removeItem('access_token'); localStorage.removeItem('lastSyncedTime'); localStorage.removeItem('localQueue:note'); @@ -57,9 +57,9 @@ const clearStorage = (): Promise => ]) .then(() => { window.electron?.send('clearCookies'); - resolve(); + resolveStorage(); }) - .catch(() => resolve()); + .catch(() => resolveStorage()); }); const forceReload = () => history.go(); diff --git a/lib/note-editor/index.tsx b/lib/note-editor/index.tsx index a9517ad43..f6a709d77 100644 --- a/lib/note-editor/index.tsx +++ b/lib/note-editor/index.tsx @@ -58,7 +58,6 @@ export class NoteEditor extends Component { // toggle Markdown enabled if (note && cmdOrCtrl && shiftKey && 'm' === key) { - console.log('toggling markdown'); toggleMarkdown(noteId, !this.markdownEnabled()); event.stopPropagation(); event.preventDefault(); diff --git a/lib/state/electron/middleware.ts b/lib/state/electron/middleware.ts index 1d660d191..faf4eec19 100644 --- a/lib/state/electron/middleware.ts +++ b/lib/state/electron/middleware.ts @@ -1,7 +1,11 @@ +import debugFactory from 'debug'; + import actions from '../actions'; import * as S from '../'; +const debug = debugFactory('electron-middleware'); + export const middleware: S.Middleware = ({ dispatch, getState }) => { window.electron.receive('appCommand', (command) => { switch (command.action) { @@ -82,7 +86,7 @@ export const middleware: S.Middleware = ({ dispatch, getState }) => { return; default: - console.log(command); + debug(`unknown AppCommand: ${command}`); } });