Problem
you are checking if pressed key is eneter or textbox has value if any of condition is true than if condition will work
if ( e.keyCode === 13 || $('#the-button').val() ) {
Change it to
if ( e.keyCode === 13) {
alert("Enter Pressed");
}
If you want value should not be empty than
if ( e.keyCode === 13 && $.trim($('#the-button').val()) !== '') {
alert("Enter Pressed");
}