From af0b57bcda8081d6936abd1c07fce42bffaf3162 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 25 Feb 2020 10:57:41 +0000 Subject: [PATCH] make BasePlatform::setLanguage sync, handle promises internally Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/vector/platform/ElectronPlatform.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/vector/platform/ElectronPlatform.js b/src/vector/platform/ElectronPlatform.js index 53269211..8e29542a 100644 --- a/src/vector/platform/ElectronPlatform.js +++ b/src/vector/platform/ElectronPlatform.js @@ -386,7 +386,10 @@ export default class ElectronPlatform extends VectorBasePlatform { return this.eventIndexManager; } - async setLanguage(preferredLangs: string[]): Promise { - return this._ipcCall('setLanguage', preferredLangs); + setLanguage(preferredLangs: string[]) { + this._ipcCall('setLanguage', preferredLangs).catch(error => { + console.log("Failed to send setLanguage IPC to Electron"); + console.error(error); + }); } }