mirror of
https://github.com/twofas/2fas-browser-extension.git
synced 2024-11-22 18:19:59 +01:00
#1501 updateBrowserExtension - name FIX
This commit is contained in:
parent
73c2d38f4d
commit
a3ed844191
@ -21,6 +21,7 @@ const config = require('../../../config');
|
||||
const { loadFromLocalStorage, saveToLocalStorage } = require('../../../localStorage');
|
||||
const SDK = require('../../../sdk');
|
||||
const storeLog = require('../../../partials/storeLog');
|
||||
const getBrowserInfo = require('../getBrowserInfo');
|
||||
|
||||
const updateBrowserExtension = async browserInfo => {
|
||||
let data;
|
||||
@ -38,7 +39,8 @@ const updateBrowserExtension = async browserInfo => {
|
||||
data?.browserInfo?.name !== browserInfo.name
|
||||
) {
|
||||
let bI = browserInfo;
|
||||
bI.name = data?.browserInfo?.name || bI.name;
|
||||
const defaultBrowserInfo = getBrowserInfo();
|
||||
bI.name = data?.browserInfo?.name || bI.name || defaultBrowserInfo.name;
|
||||
|
||||
return new SDK().updateBrowserExtension(data.extensionID, bI)
|
||||
.then(() => saveToLocalStorage({ browserInfo: bI, extensionVersion: config.ExtensionVersion }))
|
||||
|
Loading…
Reference in New Issue
Block a user