jackMort / ChatGPT.nvim

ChatGPT Neovim Plugin: Effortless Natural Language Generation with OpenAI's ChatGPT API
Apache License 2.0
3.56k stars 307 forks source link

[bug fix] Fix the code error when there is a null value in the json returned by the api #396

Closed BetaGo closed 4 months ago

BetaGo commented 4 months ago

add param to vim.json.decode , converts null in JSON objects to Lua nil instead of vim.NIL

Because:

if vim.NIL then
  -- The following code will execute
  print("hello");
end