[plugin] NewsDownloader: fix missing elements in the 'Add feeds' window (#13415)

The current code will replace "empty" UI elements with a line.
However it is relying on the truthiness of the value of the field.
If the value is False, for instance for the "download image" item,
then the UI element for that field will be replaced with a line in the
UI.
This commit is contained in:
Simon Marache
2025-03-14 20:26:38 +00:00
committed by GitHub
parent 195e4a2e0d
commit 1193bd38c1

View File

@@ -169,7 +169,7 @@ end
--
function FeedView:flattenArray(base_array, source_array)
for _, value in pairs(source_array) do
if not value[2] then
if value[2] == nil then
-- If the value is empty, then it's probably supposed to be a line
table.insert(base_array, "---")
else