From aab8384d35c6d6354d3b9ae6fa5a227fc693105f Mon Sep 17 00:00:00 2001 From: dessant Date: Sat, 8 Feb 2020 02:25:08 +0200 Subject: [PATCH] fix: send browser name to client app installer --- src/setup/App.vue | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/setup/App.vue b/src/setup/App.vue index 2c1e370..0148254 100644 --- a/src/setup/App.vue +++ b/src/setup/App.vue @@ -86,6 +86,7 @@ export default { apiUrl: apiURL.href, session: urlParams.get('session'), + browser: '', appDir: '', manifestDir: '', manifestDirEditable: false, @@ -146,10 +147,7 @@ export default { location: async function() { const data = new FormData(); data.append('session', this.session); - data.append( - 'browser', - (await browser.runtime.sendMessage({id: 'getBrowser'})).name - ); + data.append('browser', this.browser); data.append('targetEnv', targetEnv); const rsp = await fetch(`${this.apiUrl}/setup/location`, { @@ -174,6 +172,7 @@ export default { data.append('session', this.session); data.append('appDir', this.appDir); data.append('manifestDir', this.manifestDir); + data.append('browser', this.browser); data.append('targetEnv', targetEnv); data.append('extension', this.getExtensionId()); @@ -196,6 +195,8 @@ export default { }, created: async function() { + this.browser = (await browser.runtime.sendMessage({id: 'getBrowser'})).name; + await this.setLocation(); const {os} = await browser.runtime.sendMessage({id: 'getPlatform'});