Skip to content

Commit

Permalink
Merge pull request #18 from ArtisanCloud/develop
Browse files Browse the repository at this point in the history
fix(object): collection with defaut items
  • Loading branch information
Matrix-X authored Jul 4, 2022
2 parents 6d8e35e + b60bc5d commit 3bf6e26
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions object/collection.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ type Collection struct {
}

func NewCollection(items *HashMap) *Collection {

if items == nil {
items = &HashMap{}
}

return &Collection{
items: items,
}
Expand Down

0 comments on commit 3bf6e26

Please sign in to comment.