Skip to content

Commit

Permalink
fix: Surge for tvOS not able to initiate speed test
Browse files Browse the repository at this point in the history
  • Loading branch information
geekdada committed Sep 24, 2024
1 parent fe040c9 commit 297037f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pages/Policies/components/PolicyGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ const PolicyGroup: React.FC<PolicyGroupProps> = ({
])
}

if (res.winner) {
if ('winner' in res) {
const testResult = (res as UrlTestPolicyTestResult).results[0].data

Object.keys(testResult).forEach((key) => {
Expand All @@ -176,6 +176,7 @@ const PolicyGroup: React.FC<PolicyGroupProps> = ({
setSelection((res as UrlTestPolicyTestResult).winner)
} else {
const testResult = res as SelectPolicyTestResult

Object.keys(testResult).forEach((key) => {
const result = testResult[key]

Expand Down
1 change: 1 addition & 0 deletions src/pages/Policies/usePolicyPerformance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export const usePolicyPerformance = () => {
const isSupported = useVersionSupport({
ios: '4.9.5',
macos: '4.2.4',
tvos: '4.9.5',
})
const { data, error } = useSWR<PolicyBenchmarkResults>(
isSupported ? '/policies/benchmark_results' : null,
Expand Down

0 comments on commit 297037f

Please sign in to comment.