fix(packages): Look for metadata using helper method, not reading json manually

This commit is contained in:
Ben Gotow 2015-04-24 16:30:39 -07:00
parent 007cda443c
commit 8d54773955

View file

@ -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