mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-02-04 14:30:57 +08:00
fix(packages): Look for metadata using helper method, not reading json manually
This commit is contained in:
parent
007cda443c
commit
8d54773955
1 changed files with 1 additions and 2 deletions
|
@ -273,8 +273,7 @@ class PackageManager
|
|||
if windowType
|
||||
packagePaths = _.filter packagePaths, (packagePath) ->
|
||||
try
|
||||
metadataPath = path.join(packagePath, 'package.json')
|
||||
{windowTypes} = JSON.parse(fs.readFileSync(metadataPath)) ? {}
|
||||
{windowTypes} = Package.loadMetadata(packagePath) ? {}
|
||||
return windowType of (windowTypes ? {})
|
||||
catch
|
||||
return false
|
||||
|
|
Loading…
Reference in a new issue