use .includes instead of .indexOf

This commit is contained in:
Brian Gough 2021-03-29 11:13:59 +01:00
parent 32184330d9
commit a55aa61d71

View file

@ -12,7 +12,7 @@ const deploymentColour = settings.deploymentColour
var serviceCloseTime
function updateDeploymentStatus(fileContent) {
const closed = fileContent && fileContent.indexOf(deploymentColour) === -1
const closed = fileContent && !fileContent.includes(deploymentColour)
if (closed && !settings.serviceIsClosed) {
settings.serviceIsClosed = true
serviceCloseTime = Date.now() + 60 * 1000 // delay closing by 1 minute