From dcf7f9b7175aa7ffdb5b69ee1d194e6c4c24fd3e Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Mon, 6 Oct 2014 17:56:59 +0200 Subject: Fix #23: [string "MediaWikiApi.lua"]:68: table index is nil --- mediawiki.lrdevplugin/MediaWikiApi.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mediawiki.lrdevplugin/MediaWikiApi.lua b/mediawiki.lrdevplugin/MediaWikiApi.lua index 420ab9f..cde8b48 100755 --- a/mediawiki.lrdevplugin/MediaWikiApi.lua +++ b/mediawiki.lrdevplugin/MediaWikiApi.lua @@ -65,7 +65,9 @@ function MediaWikiApi.parseXmlDom(xmlDomInstance) for i = 1, xmlDomInstance:childCount() do local child = xmlDomInstance:childAtIndex(i) local childName, childNamespace = child:name() - value[childName] = MediaWikiApi.parseXmlDom(child) + if childName then + value[childName] = MediaWikiApi.parseXmlDom(child) + end end elseif xmlDomInstance:type() == 'text' then value = xmlDomInstance:text() -- cgit v1.2.3