Minor updates

This commit is contained in:
redphx
2024-07-19 06:24:17 +07:00
parent 0e03d4dc32
commit 2ecd995e47
3 changed files with 11 additions and 4 deletions

View File

@@ -14,7 +14,7 @@ type BxFlags = Partial<{
DeviceInfo: Partial<{
deviceType: 'android' | 'android-tv' | 'webos' | 'unknown',
userAgent: string,
userAgent?: string,
}>,
}>
@@ -33,7 +33,6 @@ const DEFAULT_FLAGS: BxFlags = {
DeviceInfo: {
deviceType: 'unknown',
userAgent: window.navigator.userAgent,
},
}
@@ -42,4 +41,8 @@ try {
delete window.BX_FLAGS;
} catch (e) {}
if (!BX_FLAGS.DeviceInfo!.userAgent) {
BX_FLAGS.DeviceInfo!.userAgent = window.navigator.userAgent;
}
export const NATIVE_FETCH = window.fetch;