Patch Removed troublesome IF statement

There was a dodgy IF statement blocking data from getting to the node JS
server.

Note: The Java script file was the only important change. The other
changes were just the result of fiddling to see what the issue was.