chore: remove unused catch bindings (#16121)
This commit is contained in:
parent
08f7d60da4
commit
a40d826b11
7 changed files with 12 additions and 11 deletions
|
@ -226,7 +226,7 @@ const getMessagesPath = (extensionId) => {
|
|||
const filename = path.join(localesDirectory, language, 'messages.json')
|
||||
fs.accessSync(filename, fs.constants.R_OK)
|
||||
return filename
|
||||
} catch (err) {
|
||||
} catch {
|
||||
const defaultLocale = metadata.default_locale || 'en'
|
||||
return path.join(localesDirectory, defaultLocale, 'messages.json')
|
||||
}
|
||||
|
@ -289,7 +289,7 @@ ipcMainUtils.handle('CHROME_STORAGE_WRITE', async function (event, storageType,
|
|||
|
||||
try {
|
||||
await mkdirp(path.dirname(filePath))
|
||||
} catch (error) {
|
||||
} catch {
|
||||
// we just ignore the errors of mkdir or mkdirp
|
||||
}
|
||||
|
||||
|
@ -452,14 +452,14 @@ app.on('will-quit', function () {
|
|||
if (loadedDevToolsExtensions.length > 0) {
|
||||
try {
|
||||
fs.mkdirSync(path.dirname(loadedDevToolsExtensionsPath))
|
||||
} catch (error) {
|
||||
} catch {
|
||||
// Ignore error
|
||||
}
|
||||
fs.writeFileSync(loadedDevToolsExtensionsPath, JSON.stringify(loadedDevToolsExtensions))
|
||||
} else {
|
||||
fs.unlinkSync(loadedDevToolsExtensionsPath)
|
||||
}
|
||||
} catch (error) {
|
||||
} catch {
|
||||
// Ignore error
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue