Update main.js

Noticed auto-fill for the category select box was not working during the edit function. Fixed this.