fix undefined dom in .reject()

dom is undefined at lib/traverse.js:222