Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
MBetterc
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mbetter
MBetterc
Commits
dd151fba
Commit
dd151fba
authored
Feb 20, 2026
by
Stefy Lanza (nextime / spora )
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix match template: handle outcomes array format correctly
parent
40ccb77e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
match.html
mbetterclient/qt_player/templates/match.html
+10
-7
No files found.
mbetterclient/qt_player/templates/match.html
View file @
dd151fba
...
...
@@ -1168,16 +1168,19 @@
const
venue
=
nextMatch
.
venue_kampala_township
||
nextMatch
.
venue
||
'TBD'
;
matchVenue
.
textContent
=
venue
;
// Get outcomes for this match (comes as
object/dict from database
)
let
outcomes
=
nextMatch
.
outcomes
||
{}
;
console
.
log
(
'DEBUG: Raw outcomes
object
:'
,
outcomes
);
// Get outcomes for this match (comes as
array from API
)
let
outcomes
=
nextMatch
.
outcomes
||
[]
;
console
.
log
(
'DEBUG: Raw outcomes:'
,
outcomes
);
console
.
log
(
'DEBUG: Outcomes type:'
,
typeof
outcomes
);
console
.
log
(
'DEBUG:
Outcomes keys:'
,
Object
.
keys
(
outcomes
));
console
.
log
(
'DEBUG:
Is array:'
,
Array
.
isArray
(
outcomes
));
// Convert outcomes
object
to array format for processing
// Convert outcomes to array format for processing
let
outcomesArray
=
[];
if
(
typeof
outcomes
===
'object'
&&
outcomes
!==
null
)
{
// Handle dict format from database
if
(
Array
.
isArray
(
outcomes
))
{
// Handle array format from API
outcomesArray
=
outcomes
;
}
else
if
(
typeof
outcomes
===
'object'
&&
outcomes
!==
null
)
{
// Handle dict format from database (fallback)
Object
.
entries
(
outcomes
).
forEach
(([
key
,
value
])
=>
{
outcomesArray
.
push
({
outcome_name
:
key
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment