Skip to content

Commit 60dffca

Browse files
committed
wip
1 parent a3a3e71 commit 60dffca

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

src/matches/match-relay/match-relay.service.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -121,18 +121,18 @@ export class MatchRelayService {
121121

122122
let fragmentIndex: number | null = null;
123123
const fragmentParam = request.query.fragment as string | undefined;
124-
let frag: Fragment | null = null;
124+
let fragment: Fragment | null = null;
125125

126126
if (fragmentParam == null) {
127127
fragmentIndex = Math.max(0, broadcast.length - 8);
128128

129129
if (
130130
fragmentIndex >= 0 &&
131-
fragmentIndex >= (match_field_0.start?.signup_fragment || 0)
131+
fragmentIndex >= (match_field_0.start.signup_fragment || 0)
132132
) {
133133
const _fragment = broadcast[fragmentIndex];
134134
if (this.isSyncReady(_fragment)) {
135-
frag = _fragment;
135+
fragment = _fragment;
136136
}
137137
}
138138
} else {
@@ -145,14 +145,14 @@ export class MatchRelayService {
145145
for (let i = fragmentIndex; i < broadcast.length; i++) {
146146
const _fragment = broadcast[i];
147147
if (this.isSyncReady(_fragment)) {
148-
frag = _fragment;
148+
fragment = _fragment;
149149
fragmentIndex = i;
150150
break;
151151
}
152152
}
153153
}
154154

155-
if (!frag) {
155+
if (!fragment) {
156156
response.writeHead(405, "Fragment not found, please check back soon");
157157
response.end();
158158
return;
@@ -167,9 +167,9 @@ export class MatchRelayService {
167167
}
168168

169169
// Get tick/endtick from delta field (delta has endtick, full only has tick)
170-
const fragTick = frag.full?.tick;
171-
const fragEndtick = frag.delta?.endtick;
172-
const fragTimestamp = frag.delta?.timestamp;
170+
const fragTick = fragment.full?.tick;
171+
const fragEndtick = fragment.delta?.endtick;
172+
const fragTimestamp = fragment.delta?.timestamp;
173173

174174
response.end(
175175
JSON.stringify({

0 commit comments

Comments
 (0)