diff options
| author | Aotrix <[email protected]> | 2026-06-15 21:46:06 +0200 |
|---|---|---|
| committer | Aotrix <[email protected]> | 2026-06-15 21:46:06 +0200 |
| commit | eebf37e636fc06f3ccdef015901e154ed24a3cec (patch) | |
| tree | 416d7d5ea7ee3912807d92fcc85a6fdaff2914f4 /lua/aotrix | |
| parent | 3b0c4da42660754aa17ad18451e2e520b2f40568 (diff) | |
Add nil check after reading file
Diffstat (limited to 'lua/aotrix')
| -rw-r--r-- | lua/aotrix/build.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lua/aotrix/build.lua b/lua/aotrix/build.lua index ffd0bcd..af9e0ea 100644 --- a/lua/aotrix/build.lua +++ b/lua/aotrix/build.lua @@ -19,8 +19,8 @@ end function writeJsonToFile(json, filePath) local file, error = io.open(filePath, 'r') - local content = file:read("*a") if file ~= nil then + local content = file:read("*a") local decoded_json = vim.json.decode(content) print(decoded_json["first_element"]) end |
