diff options
author | Robin Krahl <github@ireas.org> | 2014-10-06 17:56:59 +0200 |
---|---|---|
committer | Robin Krahl <github@ireas.org> | 2014-10-06 17:56:59 +0200 |
commit | dcf7f9b7175aa7ffdb5b69ee1d194e6c4c24fd3e (patch) | |
tree | a9dd6a9ee6933ca1424379db9d1f59bb03df0452 | |
parent | ee403c212cc8154148871ed884a8b7c0f968703f (diff) | |
download | LrMediaWiki-dcf7f9b7175aa7ffdb5b69ee1d194e6c4c24fd3e.tar.gz LrMediaWiki-dcf7f9b7175aa7ffdb5b69ee1d194e6c4c24fd3e.tar.bz2 |
Fix #23: [string "MediaWikiApi.lua"]:68: table index is nil
-rwxr-xr-x | mediawiki.lrdevplugin/MediaWikiApi.lua | 4 |
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() |