mirror of
https://github.com/gohugoio/hugo.git
synced 2024-05-11 05:54:58 +00:00
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