Also, the indentation of this line seems unnecessarily weird.  Can you just break after teh comma and indent the second argument to line up?

And finally, you should check for an undefined return here (or modify pickThumbnailSize instead) and use console.error() or something if no thumbnail size can be found.  But don't set camera.thumbnailSize if pickThumbnailSize doesn't return a valid value.