Skip to content

Commit

Permalink
don't crash if package.json framework not set
Browse files Browse the repository at this point in the history
fixes #42
  • Loading branch information
ryane committed May 10, 2016
1 parent 1abaf95 commit 9f60e7a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions install/catalog.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,12 @@ func (c packageCatalog) packagesIndex() (PackageCollection, error) {

meta := c.packageMeta(key)
if meta != nil {
pkg.Description = meta["description"].(string)
pkg.Framework = meta["framework"].(bool)
if desc, ok := meta["description"]; ok {
pkg.Description = desc.(string)
}
if isFramework, ok := meta["framework"]; ok {
pkg.Framework = isFramework.(bool)
}

if tagList, ok := meta["tags"].([]interface{}); ok {
tags := make([]string, len(tagList))
Expand Down

0 comments on commit 9f60e7a

Please sign in to comment.