A shorter solution for this would be: `document.getElementById('viewOutline').disabled = !outline;`