Fixed potential undefined exception when run through NodeJs

I encountered an undefined exception on the line I fixed when running jasmine tests using NodeJs. Thought you'd also like the fix.