Skip to content

Commit

Permalink
fix(history): add early return for missing response headers
Browse files Browse the repository at this point in the history
  • Loading branch information
jellydn committed May 23, 2024
1 parent 8656f4e commit 29af39b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lua/hurl/history.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ local M = {}
---@param response table
M.show = function(response)
local container = require('hurl.' .. _HURL_GLOBAL_CONFIG.mode)
if not response.headers then
-- Do not show anything if there is no response
return
end

local content_type = response.headers['content-type']
or response.headers['Content-Type']
or response.headers['Content-type']
Expand Down

0 comments on commit 29af39b

Please sign in to comment.