File tree 1 file changed +7
-4
lines changed
web/frontend/src/pages/election
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -180,9 +180,12 @@ const ElectionShow: FC = () => {
180
180
</ div >
181
181
182
182
< div className = "pt-2 break-all" > Election ID : { electionId } </ div >
183
- { status >= Status . Open && status <= Status . Canceled && (
184
- < div className = "break-all" > { t ( 'numVotes' , { num : voters . length } ) } </ div >
185
- ) }
183
+ { status >= Status . Open &&
184
+ status <= Status . Canceled &&
185
+ voters !== null &&
186
+ voters !== undefined && (
187
+ < div className = "break-all" > { t ( 'numVotes' , { num : voters . length } ) } </ div >
188
+ ) }
186
189
< div className = "py-6 pl-2" >
187
190
< div className = "font-bold uppercase text-lg text-gray-700" > { t ( 'status' ) } </ div >
188
191
{ DKGLoading && (
@@ -220,7 +223,7 @@ const ElectionShow: FC = () => {
220
223
) }
221
224
</ div >
222
225
</ div >
223
- { voters . length > 0 && (
226
+ { voters !== null && voters !== undefined && voters . length > 0 && (
224
227
< div className = "py-4 pl-2 pb-8" >
225
228
< div className = "font-bold uppercase text-lg text-gray-700 pb-2" > { t ( 'userID' ) } </ div >
226
229
< div className = "px-2" >
You can’t perform that action at this time.
0 commit comments