mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 08:13:42 +00:00
prod environment settings
This commit is contained in:
@@ -262,7 +262,8 @@ export class BrowserApi {
|
||||
}
|
||||
|
||||
static gaFilter() {
|
||||
return BrowserApi.isSafariApi && safari.application.activeBrowserWindow.activeTab.private;
|
||||
return process.env.ENV !== 'production' ||
|
||||
(BrowserApi.isSafariApi && safari.application.activeBrowserWindow.activeTab.private);
|
||||
}
|
||||
|
||||
static getUILanguage(win: Window) {
|
||||
|
||||
@@ -9,8 +9,8 @@ require('../scripts/duo.js');
|
||||
|
||||
import { AppModule } from './app.module';
|
||||
|
||||
// if (!isDev()) {
|
||||
// enableProdMode();
|
||||
// }
|
||||
if (process.env.ENV === 'production') {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
|
||||
@@ -80,10 +80,10 @@ export function initFactory(i18nService: I18nService, storageService: StorageSer
|
||||
window.document.documentElement.classList.add('locale_' + i18nService.translationLocale);
|
||||
authService.init();
|
||||
|
||||
new Analytics(window, () => BrowserApi.gaFilter(), null, null, null, () => {
|
||||
const analytics = new Analytics(window, () => BrowserApi.gaFilter(), null, null, null, () => {
|
||||
const bgPage = BrowserApi.getBackgroundPage();
|
||||
if (bgPage == null || bgPage.bitwardenMain == null) {
|
||||
throw 'Cannot resolve background page main.';
|
||||
throw new Error('Cannot resolve background page main.');
|
||||
}
|
||||
return bgPage.bitwardenMain;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user