Update main.js

That broke everything.  So much for being hopeful.  New idea is to get rid of the var in the if statement.