From 0998ae8bbc626015b35aed5451dd6d9414fb1444 Mon Sep 17 00:00:00 2001 From: Ivan Nikolic Date: Thu, 12 Mar 2020 19:21:21 +0100 Subject: [PATCH] fix(electron): Provide app version in Device.getInfo() (#2521) --- electron/src/electron/device.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/electron/src/electron/device.ts b/electron/src/electron/device.ts index 0c4ea7cff4..6bd5ee2dcc 100644 --- a/electron/src/electron/device.ts +++ b/electron/src/electron/device.ts @@ -1,4 +1,5 @@ import { DeviceBatteryInfo, DeviceInfo, DeviceLanguageCodeResult, DevicePlugin, DevicePluginWeb, WebPlugin } from "@capacitor/core"; +const { app } = require('electron').remote; declare var navigator: any; const webDevice = new DevicePluginWeb(); @@ -17,7 +18,7 @@ export class DevicePluginElectron extends WebPlugin implements DevicePlugin { return { model: info.model, platform: <'electron'> 'electron', - appVersion: '', + appVersion: app.getVersion(), appBuild: '', operatingSystem: info.operatingSystem, osVersion: info.osVersion,