fix: app emits ugly errors when retrieving settings
This commit is contained in:
parent
76b2e58779
commit
176fbc6a99
@ -168,6 +168,7 @@ export abstract class BaseExtension implements ExtensionType {
|
|||||||
])
|
])
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
if (!(await fs.existsSync(settingPath))) return []
|
||||||
const content = await fs.readFileSync(settingPath, 'utf-8')
|
const content = await fs.readFileSync(settingPath, 'utf-8')
|
||||||
const settings: SettingComponentProps[] = JSON.parse(content)
|
const settings: SettingComponentProps[] = JSON.parse(content)
|
||||||
return settings
|
return settings
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user