adjust specific hasClass declaration

classList has the `contains` method, but the native Node method expects `otherNode` to be a Node element, so something like 

    $('p.test')[0].hasClass('selected')

Will throw an error.

https://developer.mozilla.org/en-US/docs/Web/API/Node.contains