@@ -18,10 +18,13 @@ export default async function Downloads() {
18
18
} ) ;
19
19
const avm1ApiDone = await getAVM1Progress ( ) ;
20
20
const report = await fetchReport ( ) ;
21
- const summary = report ? report . summary : undefined ;
22
- const maxPoints = summary ? summary . max_points : NaN ;
23
- const implPoints = summary ? summary . impl_points : NaN ;
24
- const stubPenalty = summary ? summary . stub_penalty : NaN ;
21
+ if ( ! report ) {
22
+ return ;
23
+ }
24
+ const summary = report . summary ;
25
+ const maxPoints = summary . max_points ;
26
+ const implPoints = summary . impl_points ;
27
+ const stubPenalty = summary . stub_penalty ;
25
28
const avm2ApiDone = Math . round ( ( implPoints - stubPenalty ) / maxPoints * 100 ) ;
26
29
const avm2ApiStubbed = Math . round ( stubPenalty / maxPoints * 100 ) ;
27
30
@@ -92,28 +95,26 @@ export default async function Downloads() {
92
95
</ Text >
93
96
</ AvmBlock >
94
97
95
- { ! Number . isNaN ( avm2ApiDone ) && ! Number . isNaN ( avm2ApiStubbed ) && (
96
- < AvmBlock
97
- name = "AVM 2: ActionScript 3"
98
- language = { { done : 75 } }
99
- api = { { done : avm2ApiDone , stubbed : avm2ApiStubbed } }
100
- info_link = "/compatibility/avm2"
101
- >
102
- < Text >
103
- AVM 2 was introduced with Flash Player 9 (June 2006), to replace
104
- the earlier AVM 1. After the release of Flash Professional CC
105
- (2013), authors are required to use ActionScript 3 - making any
106
- movie made after that date very likely to fall under this
107
- category.
108
- </ Text >
109
- < Text >
110
- Ruffle now has decent support for AVM 2, and it's our
111
- experience that most games will work well enough to be played.
112
- We're still rapidly improving in this area though, so bug
113
- reports about any broken content are always welcome!
114
- </ Text >
115
- </ AvmBlock >
116
- ) }
98
+ < AvmBlock
99
+ name = "AVM 2: ActionScript 3"
100
+ language = { { done : 75 } }
101
+ api = { { done : avm2ApiDone , stubbed : avm2ApiStubbed } }
102
+ info_link = "/compatibility/avm2"
103
+ >
104
+ < Text >
105
+ AVM 2 was introduced with Flash Player 9 (June 2006), to replace
106
+ the earlier AVM 1. After the release of Flash Professional CC
107
+ (2013), authors are required to use ActionScript 3 - making any
108
+ movie made after that date very likely to fall under this
109
+ category.
110
+ </ Text >
111
+ < Text >
112
+ Ruffle now has decent support for AVM 2, and it's our
113
+ experience that most games will work well enough to be played.
114
+ We're still rapidly improving in this area though, so bug
115
+ reports about any broken content are always welcome!
116
+ </ Text >
117
+ </ AvmBlock >
117
118
</ Flex >
118
119
119
120
< Stack w = "100%" align = "center" >
0 commit comments