Skip to content

Commit

Permalink
modify newslist() (#33)
Browse files Browse the repository at this point in the history
Since there was a problem that an error occurred unless an option was passed to the newslist function, it was fixed
  • Loading branch information
mikunimaru authored and RyanZim committed Dec 24, 2018
1 parent 2006a08 commit 6bc0fbc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ function newsFeedsAndCategories () {
}

function newsList (lang, options) {
options = options || {}
let url = `${baseUrl}data/v2/news/?lang=${lang}`
if (options.feeds) url += `&feeds=${options.feeds}`
if (options.categories) url += `&categories=${options.categories}`
Expand Down

0 comments on commit 6bc0fbc

Please sign in to comment.