chore: remove unused catch bindings (#16121)

This commit is contained in:
ZYSzys 2019-02-21 17:26:07 +08:00 committed by Cheng Zhao
parent 08f7d60da4
commit a40d826b11
7 changed files with 12 additions and 11 deletions

View file

@ -107,13 +107,14 @@ require('@electron/internal/browser/guest-window-manager')
let packagePath = null
let packageJson = null
const searchPaths = ['app', 'app.asar', 'default_app.asar']
if (process.resourcesPath) {
for (packagePath of searchPaths) {
try {
packagePath = path.join(process.resourcesPath, packagePath)
packageJson = require(path.join(packagePath, 'package.json'))
break
} catch (error) {
} catch {
continue
}
}