@@ -173,7 +173,7 @@ export const evaluateApplication = async (
173
173
)
174
174
) ;
175
175
176
- if ( errorFetching !== undefined || application === null ) {
176
+ if ( errorFetching !== undefined || application === undefined ) {
177
177
logger . warn (
178
178
`No application found for alloApplicationId: ${ alloApplicationId } `
179
179
) ;
@@ -185,7 +185,7 @@ export const evaluateApplication = async (
185
185
poolService . getPoolByChainIdAndAlloPoolId ( chainId , alloPoolId )
186
186
) ;
187
187
188
- if ( errorGetPool !== undefined || pool == null ) {
188
+ if ( errorGetPool !== undefined || pool === undefined ) {
189
189
logger . warn ( `No pool found for poolId: ${ alloPoolId } ` ) ;
190
190
res . status ( 404 ) . json ( { message : 'Pool not found' } ) ;
191
191
return ;
@@ -195,7 +195,7 @@ export const evaluateApplication = async (
195
195
createEvaluation ( createEvaluationParams )
196
196
) ;
197
197
198
- if ( evaluationError !== undefined || evaluationResponse === null ) {
198
+ if ( evaluationError !== undefined || evaluationResponse === undefined ) {
199
199
logger . error (
200
200
'Evaluation creation failed:' ,
201
201
evaluationError ?? 'Unknown error'
@@ -223,7 +223,7 @@ export const createEvaluation = async (
223
223
evaluationService . createEvaluationWithAnswers ( params )
224
224
) ;
225
225
226
- if ( evaluationError !== undefined || evaluation == null ) {
226
+ if ( evaluationError !== undefined || evaluation === undefined ) {
227
227
logger . error ( 'Failed to create evaluation: Evaluation is null.undefined' ) ;
228
228
throw new IsNullError ( 'Evaluation is null/undefined' ) ;
229
229
}
@@ -278,7 +278,11 @@ export const triggerLLMEvaluation = async (
278
278
} )
279
279
) ;
280
280
281
- if ( errorFetching != null || indexerApplicationData == null ) {
281
+ if (
282
+ errorFetching !== undefined ||
283
+ indexerApplicationData === undefined ||
284
+ indexerApplicationData === null
285
+ ) {
282
286
logger . warn (
283
287
`No pool found for chainId: ${ chainId } , alloPoolId: ${ alloPoolId } `
284
288
) ;
@@ -403,7 +407,11 @@ async function processSingleEvaluation(
403
407
} )
404
408
) ;
405
409
406
- if ( error !== undefined || fetchedRound == null ) {
410
+ if (
411
+ error !== undefined ||
412
+ fetchedRound === undefined ||
413
+ fetchedRound === null
414
+ ) {
407
415
logger . error ( 'Failed to fetch round with applications' ) ;
408
416
throw new Error ( 'Failed to fetch round with applications' ) ;
409
417
}
0 commit comments