Update app.js

Added an condition when content is empty.