Minor fixes

This commit is contained in:
redphx
2024-07-30 18:06:40 +07:00
parent 9fad2914ac
commit 361ce057b7
4 changed files with 9 additions and 17 deletions

View File

@@ -1,4 +1,4 @@
type BxFlags = Partial<{
type BxFlags = {
CheckForUpdate: boolean;
EnableXcloudLogging: boolean;
SafariWorkaround: boolean;
@@ -6,13 +6,11 @@ type BxFlags = Partial<{
ForceNativeMkbTitles: string[];
FeatureGates: {[key: string]: boolean} | null,
IsSupportedTvBrowser: boolean,
DeviceInfo: Partial<{
DeviceInfo: {
deviceType: 'android' | 'android-tv' | 'webos' | 'unknown',
userAgent?: string,
}>,
}>
}
}
// Setup flags
const DEFAULT_FLAGS: BxFlags = {
@@ -33,8 +31,8 @@ try {
delete window.BX_FLAGS;
} catch (e) {}
if (!BX_FLAGS.DeviceInfo!.userAgent) {
BX_FLAGS.DeviceInfo!.userAgent = window.navigator.userAgent;
if (!BX_FLAGS.DeviceInfo.userAgent) {
BX_FLAGS.DeviceInfo.userAgent = window.navigator.userAgent;
}
export const NATIVE_FETCH = window.fetch;