Error in main.js

Error message displaying fix