mediawiki-api-js
Advanced tools
Comparing version 3.1.42 to 3.1.416
@@ -27,3 +27,3 @@ const api = require("./api"); | ||
}).then((result) => { | ||
return result.query.pages[page.pageid].extract; | ||
return result ? result.query.pages[page.pageid].extract : ""; | ||
}); | ||
@@ -46,3 +46,3 @@ }; | ||
}).then((result) => { | ||
return result.query.pages[page.pageid].extract; | ||
return result ? result.query.pages[page.pageid].extract : ""; | ||
}); | ||
@@ -64,3 +64,3 @@ }; | ||
}).then((result) => { | ||
return result.query.pages[page.pageid].extlinks.map(link => link["*"]); | ||
return result ? result.query.pages[page.pageid].extlinks.map(link => link["*"]) : []; | ||
}); | ||
@@ -81,3 +81,3 @@ }; | ||
}).then((result) => { | ||
return result.query.pages[page.pageid].categories.map(category => category.title); | ||
return result ? result.query.pages[page.pageid].categories.map(category => category.title) : []; | ||
}); | ||
@@ -84,0 +84,0 @@ }; |
{ | ||
"name": "mediawiki-api-js", | ||
"version": "3.1.42", | ||
"version": "3.1.416", | ||
"author": "Alistair O'Brien <johnyob132@gmail.com>", | ||
@@ -5,0 +5,0 @@ "description": "Wrapper for MediaWiki API", |
7331