The following error appears when editing pages such as https://en.wikisource.org/w/index.php?title=Page:does_not_exist.pdf/2&action=edit which do not correspond to a page within an existing file:
TypeError: $prpImage.find(...)[0] is undefined
Coming from this code:
function ExtractTextWidget( ocrTool, $prpImage, $textbox ) { /* … */ this.ocrTool.setImage( $prpImage.find( 'img' )[ 0 ].src ); /* … */