Update main.js

Removed problem space after if statement