Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.

Commit

Permalink
fix: properly emit JSON strings for empty maps in pin and pinStatus o…
Browse files Browse the repository at this point in the history
…bjects
  • Loading branch information
aschmahmann committed Sep 21, 2020
1 parent fa6705a commit c86fa75
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions model.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func (p *pinObject) MarshalJSON() ([]byte, error) {
}
}

var metaStr string
metaStr := "{}"
if meta := p.GetMeta(); meta != nil {
metaBytes, err := json.Marshal(meta)
if err == nil {
Expand Down Expand Up @@ -138,7 +138,7 @@ func (p *pinStatusObject) MarshalJSON() ([]byte, error) {
}
}

var infoStr string
infoStr := "{}"
if info := p.GetInfo(); info != nil {
infoBytes, err := json.Marshal(info)
if err == nil {
Expand Down

0 comments on commit c86fa75

Please sign in to comment.