File tree Expand file tree Collapse file tree 3 files changed +17
-15
lines changed Expand file tree Collapse file tree 3 files changed +17
-15
lines changed Original file line number Diff line number Diff line change @@ -225,18 +225,20 @@ function ImgGenCore(props: ImgGenProps): React.ReactElement {
225
225
if ( options ?. debug ) {
226
226
console . log ( '[ImgGen Debug] Render state:' , {
227
227
isPlaceholder,
228
- document : document ? {
229
- _id : document . _id ,
230
- _files : document . _files ? Object . keys ( document . _files ) : null ,
231
- hasPrompts : ! ! document . prompts ,
232
- currentPromptKey : document . currentPromptKey || null ,
233
- hasPrompt : ! ! document . prompt ,
234
- docType : document . type || null
235
- } : null ,
228
+ document : document
229
+ ? {
230
+ _id : document . _id ,
231
+ _files : document . _files ? Object . keys ( document . _files ) : null ,
232
+ hasPrompts : ! ! document . prompts ,
233
+ currentPromptKey : document . currentPromptKey || null ,
234
+ hasPrompt : ! ! document . prompt ,
235
+ docType : document . type || null ,
236
+ }
237
+ : null ,
236
238
loading,
237
239
error : error ?. message ,
238
240
currentEditedPrompt : currentEditedPrompt || null ,
239
- imageData : ! ! imageData
241
+ imageData : ! ! imageData ,
240
242
} ) ;
241
243
}
242
244
// If we don't have a prompt or ID, show the waiting component
Original file line number Diff line number Diff line change @@ -303,17 +303,17 @@ export function ImgGenDisplay({
303
303
loading,
304
304
error : error ?. message ,
305
305
totalVersions,
306
- promptText
306
+ promptText,
307
307
} ) ;
308
308
}
309
-
309
+
310
310
if ( ! document . _files || ( ! fileKey && ! document . _files . image ) ) {
311
311
if ( debug ) {
312
312
console . log ( '[ImgGenDisplay Debug] Missing image file - showing error' , {
313
313
hasFiles : ! ! document . _files ,
314
314
fileKey,
315
315
defaultImageExists : ! ! document . _files ?. image ,
316
- loading
316
+ loading,
317
317
} ) ;
318
318
}
319
319
return < ImgGenError message = "Missing image file" /> ;
Original file line number Diff line number Diff line change @@ -357,18 +357,18 @@ export function useImageGen({
357
357
) {
358
358
// Use the document's prompt to generate an image
359
359
console . log ( `Document ${ _id } has no files but has prompt, generating image` ) ;
360
-
360
+
361
361
// Extended debug info
362
362
if ( options ?. debug ) {
363
363
console . log ( '[ImgGen Debug] Document found with prompt but no files:' , {
364
364
docId : existingDoc . _id ,
365
365
docPrompt : existingDoc . prompt ,
366
366
settingLoading : true ,
367
367
settingDocument : true ,
368
- loadingValue : loading
368
+ loadingValue : loading ,
369
369
} ) ;
370
370
}
371
-
371
+
372
372
const docPrompt = existingDoc . prompt ;
373
373
374
374
// Set loading state to true to show progress indicator
You can’t perform that action at this time.
0 commit comments