getSiteInfo fix

This commit is contained in:
vss-devel 2019-07-15 12:41:17 +03:00
parent 5a3993ce25
commit c9ef2fb9e6

View File

@ -996,6 +996,7 @@ async function loadPreRequisites () {
}
async function getSiteInfo () {
let info
try {
const resp = await api ({
action: 'query',
@ -1003,12 +1004,12 @@ async function getSiteInfo () {
siprop: 'general|namespaces|namespacealiases',
})
const info = resp.query
info = resp.query
log( 'SiteInfo', info )
wiki.info = info
} catch ( err ) {
fatal( 'SiteInfo error', err )
}
wiki.info = info
wiki.indexUrl = info.general.script
wiki.mainPage = info.general.mainpage
wiki.articlePath = info.general.articlepath.split('$')[0]