LearnBoost/mongoose — pull request #1978 by hallucynogenyc (2014-03-27 16:02:53+00:00)
Title: The code was broken

push puts the element in the end of the array, so the next line only works if firstelement = last element, aka the array was empty. If it wasn't it won't work.