@@ -225,7 +225,7 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
225225 path : `/plugin/${ this . pluginInstanceId } /analyze` ,
226226 handler : async ( { body, adminUser, headers } ) => {
227227 const selectedIds = body . selectedIds || [ ] ;
228- if ( typeof ( this . options . rateLimits . fillFieldsFromImages ) === 'string' ) {
228+ if ( typeof ( this . options . rateLimits ? .fillFieldsFromImages ) === 'string' ) {
229229 if ( this . checkRateLimit ( "fillFieldsFromImages" , this . options . rateLimits . fillFieldsFromImages , headers ) ) {
230230 return { error : "Rate limit exceeded" } ;
231231 }
@@ -275,7 +275,7 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
275275 path : `/plugin/${ this . pluginInstanceId } /analyze_no_images` ,
276276 handler : async ( { body, adminUser, headers } ) => {
277277 const selectedIds = body . selectedIds || [ ] ;
278- if ( typeof ( this . options . rateLimits . fillPlainFields ) === 'string' ) {
278+ if ( typeof ( this . options . rateLimits ? .fillPlainFields ) === 'string' ) {
279279 if ( this . checkRateLimit ( "fillPlainFields" , this . options . rateLimits . fillPlainFields , headers ) ) {
280280 return { error : "Rate limit exceeded" } ;
281281 }
@@ -461,7 +461,7 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
461461 handler : async ( { body, headers } ) => {
462462 const selectedIds = body . selectedIds || [ ] ;
463463 const STUB_MODE = false ;
464- if ( typeof ( this . options . rateLimits . generateImages ) === 'string' ) {
464+ if ( typeof ( this . options . rateLimits ? .generateImages ) === 'string' ) {
465465 if ( this . checkRateLimit ( "generateImages" , this . options . rateLimits . generateImages , headers ) ) {
466466 return { error : "Rate limit exceeded" } ;
467467 }
0 commit comments