Add missing negation to check for class in snippet JS.

We should only keep searching up the chain if we haven’t found the 
metadata div yet.