Verify the variant exists
Merge pull request #1434 from guardian/fix-gallery-js

Verify the variant exists