mirror of
https://github.com/gohugoio/hugo.git
synced 2026-08-24 15:28:54 +00:00
e30d711c29
When fetching JSON files from the /data folder that are empty they will be added as empty map[string]any. This makes sure that no empty JSON file causes the site to crash because of a failed unmarshal. This happens because empty is not a valid JSON string. It is therefore important to check the lenght of the data before passing it to the JSON unmarshal function. Fixes #8601