Skip to content

Commit 297037f

Browse files
committed
fix: Surge for tvOS not able to initiate speed test
1 parent fe040c9 commit 297037f

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/pages/Policies/components/PolicyGroup.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ const PolicyGroup: React.FC<PolicyGroupProps> = ({
156156
])
157157
}
158158

159-
if (res.winner) {
159+
if ('winner' in res) {
160160
const testResult = (res as UrlTestPolicyTestResult).results[0].data
161161

162162
Object.keys(testResult).forEach((key) => {
@@ -176,6 +176,7 @@ const PolicyGroup: React.FC<PolicyGroupProps> = ({
176176
setSelection((res as UrlTestPolicyTestResult).winner)
177177
} else {
178178
const testResult = res as SelectPolicyTestResult
179+
179180
Object.keys(testResult).forEach((key) => {
180181
const result = testResult[key]
181182

src/pages/Policies/usePolicyPerformance.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export const usePolicyPerformance = () => {
1111
const isSupported = useVersionSupport({
1212
ios: '4.9.5',
1313
macos: '4.2.4',
14+
tvos: '4.9.5',
1415
})
1516
const { data, error } = useSWR<PolicyBenchmarkResults>(
1617
isSupported ? '/policies/benchmark_results' : null,

0 commit comments

Comments
 (0)