Skip to content

Commit a989cad

Browse files
carstenbauerKristofferC
authored andcommitted
Define Content(::Nothing) (#140)
* Update contents.jl * fix
1 parent 7c07ba1 commit a989cad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/repositories/contents.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,6 @@ content_uri(repo, path) = "/repos/$(name(repo))/contents/$(name(path))"
7474
function build_content_response(json::Dict)
7575
results = Dict()
7676
haskey(json, "commit") && setindex!(results, Commit(json["commit"]), "commit")
77-
haskey(json, "content") && setindex!(results, Content(json["content"]), "content")
77+
haskey(json, "content") && setindex!(results, isnothing(json["content"]) ? nothing : Content(json["content"]), "content")
7878
return results
7979
end

0 commit comments

Comments
 (0)