In the message-que.js you forgot to add return statement in length getter which causes assuming that queue is empty 