aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Krahl <github@ireas.org>2014-10-06 17:56:59 +0200
committerRobin Krahl <github@ireas.org>2014-10-06 17:56:59 +0200
commitdcf7f9b7175aa7ffdb5b69ee1d194e6c4c24fd3e (patch)
treea9dd6a9ee6933ca1424379db9d1f59bb03df0452
parentee403c212cc8154148871ed884a8b7c0f968703f (diff)
downloadLrMediaWiki-dcf7f9b7175aa7ffdb5b69ee1d194e6c4c24fd3e.tar.gz
LrMediaWiki-dcf7f9b7175aa7ffdb5b69ee1d194e6c4c24fd3e.tar.bz2
Fix #23: [string "MediaWikiApi.lua"]:68: table index is nil
-rwxr-xr-xmediawiki.lrdevplugin/MediaWikiApi.lua4
1 files changed, 3 insertions, 1 deletions
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()