The else should be in the same line as the closing braces of the if (`} else {`).