Skip to content

Commit

Permalink
Fix npe
Browse files Browse the repository at this point in the history
  • Loading branch information
kegsay committed Oct 9, 2023
1 parent d8800c5 commit 68d9d63
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func (c *CSAPI) MustSync(t TestLike, syncReq SyncReq) (gjson.Result, string) {
// Perform a single /sync request with the given request options. To sync until something happens,
// see `MustSyncUntil`.
//
// Returns the HTTP response if the /sync request does not return 200 OK.
// Always returns the HTTP response, even on non-2xx.
// Returns the top-level parsed /sync response JSON on 200 OK.
func (c *CSAPI) Sync(t TestLike, syncReq SyncReq) (gjson.Result, *http.Response) {
t.Helper()
Expand Down Expand Up @@ -180,7 +180,7 @@ func (c *CSAPI) Sync(t TestLike, syncReq SyncReq) (gjson.Result, *http.Response)
}
body := ParseJSON(t, res)
result := gjson.ParseBytes(body)
return result, nil
return result, res
}

// Check that the timeline for `roomID` has an event which passes the check function.
Expand Down

0 comments on commit 68d9d63

Please sign in to comment.