Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions internal/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ func NewRequest(method string, path string, queryParameters []string, body []byt

isExtensionsLiveEndpoint := false // https://github.com/twitchdev/twitch-cli/issues/157

data.Data = make([]interface{}, 0)
client, err := GetClientInformation()
if err != nil {
return fmt.Errorf("Error fetching client information: %v", err.Error())
Expand Down Expand Up @@ -186,7 +185,7 @@ func NewRequest(method string, path string, queryParameters []string, body []byt
runCounter++
}

if data.Data == nil {
if data.Data == nil && data.Error == "" {
data.Data = make([]interface{}, 0)
}
// handle json marshalling better; returns empty slice vs. null
Expand Down