fix: display correct app version for desktop

This commit is contained in:
Mo
2022-01-03 15:28:04 -06:00
committed by Karol Sójko
parent e79f326e5b
commit dfde84c2f6
9 changed files with 60 additions and 104 deletions

View File

@@ -1,9 +1,9 @@
import { isNullOrUndefined, SNLog } from '@standardnotes/snjs';
import { isDesktopApplication, isDev } from '@/utils';
import { getDesktopVersion, isDesktopApplication, isDev } from '@/utils';
import { storage, StorageKey } from './localStorage';
import Bugsnag from '@bugsnag/js';
import { WebCrypto } from '../crypto';
import { AppVersion } from '@/version';
import { WebAppVersion } from '@/version';
function redactFilePath(line: string): string {
const fileName = line.match(/\w+\.(html|js)/)?.[0];
@@ -43,7 +43,7 @@ export function startErrorReporting(): void {
Bugsnag.start({
apiKey: window._bugsnag_api_key,
appType: isDesktopApplication() ? 'desktop' : 'web',
appVersion: AppVersion,
appVersion: getDesktopVersion() || WebAppVersion,
collectUserIp: false,
autoTrackSessions: false,
releaseStage: isDev ? 'development' : undefined,