mirror of
https://codeberg.org/tacerus/teddit.git
synced 2025-01-09 04:42:35 +01:00
don't fetch sidebar for /r/all
This commit is contained in:
parent
f5a070e6bd
commit
c838f10d01
@ -23,6 +23,7 @@ module.exports = function() {
|
||||
}
|
||||
resolve(obj)
|
||||
} else {
|
||||
if(subreddit !== 'all') {
|
||||
fetch(encodeURI(`https://oauth.reddit.com/r/${subreddit}/about`), redditApiGETHeaders())
|
||||
.then(result => {
|
||||
if(result.status === 200) {
|
||||
@ -58,6 +59,9 @@ module.exports = function() {
|
||||
console.error('Error fetching the sidebar.', error)
|
||||
resolve(null)
|
||||
})
|
||||
} else {
|
||||
resolve(null)
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user