Skip to content

Commit 08bb621

Browse files
author
Ryan Patrick Kyle
committed
use !isnothing(body)
1 parent b0bf83a commit 08bb621

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/handlers.jl

+3-2
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ function make_handler(app::DashApp; debug::Bool = false)
9696
index_string::String = index_page(app, debug = debug)
9797

9898
return function (req::HTTP.Request)
99+
body::Union{Nothing, String} = nothing
99100
uri = HTTP.URI(req.target)
100101

101102
# verify that the client accepts compression
@@ -135,9 +136,9 @@ function make_handler(app::DashApp; debug::Bool = false)
135136
end
136137
end
137138
end
138-
if @isdefined body
139+
if !isnothing(body)
139140
return make_response(200, headers, body, with_gzip)
140141
end
141142
return HTTP.Response(404)
142143
end
143-
end
144+
end

0 commit comments

Comments
 (0)