use includes instead of indexOf

This commit is contained in:
Vanessa Yuen 2017-06-09 14:45:47 -07:00 committed by GitHub
parent 254dcdaa45
commit 43271c162a

View file

@ -163,7 +163,7 @@ require('./api/protocol')
const mainStartupScript = packageJson.main || 'index.js' const mainStartupScript = packageJson.main || 'index.js'
// Workaround for electron/electron#5050 and electron/electron#9046 // Workaround for electron/electron#5050 and electron/electron#9046
if (process.platform === 'linux' && ['Pantheon', 'Unity:Unity7'].indexOf(process.env.XDG_CURRENT_DESKTOP) !== -1) { if (process.platform === 'linux' && ['Pantheon', 'Unity:Unity7'].includes(process.env.XDG_CURRENT_DESKTOP)) {
process.env.XDG_CURRENT_DESKTOP = 'Unity' process.env.XDG_CURRENT_DESKTOP = 'Unity'
} }