@@ -99,7 +99,7 @@ export class FikaMatchService {
99
99
}
100
100
101
101
/**
102
- * Returns the player with the given id in the given match, undefined if either match or player does not exist
102
+ * Returns the player with the given id in the given match, returns undefined if either match or player does not exist
103
103
* @param matchId
104
104
* @param playerId
105
105
* @returns
@@ -117,12 +117,12 @@ export class FikaMatchService {
117
117
}
118
118
119
119
/**
120
- * Returns the match id that has a player with the given player id, undefined if the player isn't in a match
120
+ * Returns the match id that has a player with the given player id, returns undefined if the player isn't in a match
121
121
*
122
122
* @param playerId
123
123
* @returns
124
124
*/
125
- public getMatchIdByPlayer ( playerId : string ) : string {
125
+ public getMatchIdByPlayer ( playerId : string ) : string | undefined {
126
126
for ( const [ key , value ] of this . matches . entries ( ) ) {
127
127
if ( value . players . has ( playerId ) ) {
128
128
return key ;
@@ -133,14 +133,14 @@ export class FikaMatchService {
133
133
}
134
134
135
135
/**
136
- * Returns the match id that has a player with the given session id, undefined if the player isn't in a match
136
+ * Returns the match id that has a player with the given session id, returns undefined if the player isn't in a match
137
137
*
138
138
* Note:
139
139
* - First tries to find pmc, then scav
140
140
* @param sessionId
141
141
* @returns
142
142
*/
143
- public getMatchIdByProfile ( sessionId : string ) : string {
143
+ public getMatchIdByProfile ( sessionId : string ) : string | undefined {
144
144
const profile = this . saveServer . getProfile ( sessionId ) ;
145
145
146
146
// check if pmc is in match
0 commit comments