@@ -173,7 +173,7 @@ export const evaluateApplication = async (
173173 )
174174 ) ;
175175
176- if ( errorFetching !== undefined || application === null ) {
176+ if ( errorFetching !== undefined || application === undefined ) {
177177 logger . warn (
178178 `No application found for alloApplicationId: ${ alloApplicationId } `
179179 ) ;
@@ -185,7 +185,7 @@ export const evaluateApplication = async (
185185 poolService . getPoolByChainIdAndAlloPoolId ( chainId , alloPoolId )
186186 ) ;
187187
188- if ( errorGetPool !== undefined || pool == null ) {
188+ if ( errorGetPool !== undefined || pool === undefined ) {
189189 logger . warn ( `No pool found for poolId: ${ alloPoolId } ` ) ;
190190 res . status ( 404 ) . json ( { message : 'Pool not found' } ) ;
191191 return ;
@@ -195,7 +195,7 @@ export const evaluateApplication = async (
195195 createEvaluation ( createEvaluationParams )
196196 ) ;
197197
198- if ( evaluationError !== undefined || evaluationResponse === null ) {
198+ if ( evaluationError !== undefined || evaluationResponse === undefined ) {
199199 logger . error (
200200 'Evaluation creation failed:' ,
201201 evaluationError ?? 'Unknown error'
@@ -223,7 +223,7 @@ export const createEvaluation = async (
223223 evaluationService . createEvaluationWithAnswers ( params )
224224 ) ;
225225
226- if ( evaluationError !== undefined || evaluation == null ) {
226+ if ( evaluationError !== undefined || evaluation === undefined ) {
227227 logger . error ( 'Failed to create evaluation: Evaluation is null.undefined' ) ;
228228 throw new IsNullError ( 'Evaluation is null/undefined' ) ;
229229 }
@@ -278,7 +278,11 @@ export const triggerLLMEvaluation = async (
278278 } )
279279 ) ;
280280
281- if ( errorFetching != null || indexerApplicationData == null ) {
281+ if (
282+ errorFetching !== undefined ||
283+ indexerApplicationData === undefined ||
284+ indexerApplicationData === null
285+ ) {
282286 logger . warn (
283287 `No pool found for chainId: ${ chainId } , alloPoolId: ${ alloPoolId } `
284288 ) ;
@@ -403,7 +407,11 @@ async function processSingleEvaluation(
403407 } )
404408 ) ;
405409
406- if ( error !== undefined || fetchedRound == null ) {
410+ if (
411+ error !== undefined ||
412+ fetchedRound === undefined ||
413+ fetchedRound === null
414+ ) {
407415 logger . error ( 'Failed to fetch round with applications' ) ;
408416 throw new Error ( 'Failed to fetch round with applications' ) ;
409417 }
0 commit comments