Thanks for this repo, it's a life saver!
I'm having some errors in this new site that I'm working. If I remove the selected image and try to add it again I'm getting a WordPress alert with "Could not set that as the thumbnail image.."
I was trying to see what was going on and the MediaModal callback attachment parameter is an array instead of an object for the subsequent calls.
Hello,
Thanks for this repo, it's a life saver! I'm having some errors in this new site that I'm working. If I remove the selected image and try to add it again I'm getting a WordPress alert with "Could not set that as the thumbnail image.."
I was trying to see what was going on and the MediaModal callback
attachment
parameter is an array instead of an object for the subsequent calls.I was able to fix with
attachment.id || attachment[0].id
forsetAsThumbnail