Compare commits

..

No commits in common. "d80a69920f4163ab4d3836247eb3865ccd7f9fcb" and "f1940a7cee9109aacd8b0089a5733b1e7632f1cc" have entirely different histories.

2 changed files with 8 additions and 11 deletions

BIN
bun.lockb Executable file

Binary file not shown.

View File

@ -4,16 +4,13 @@ import { createSource, createSourceOptions, extractImages, downloadImages, getPo
let nitter = {} let nitter = {}
export const fetchChannelFromInstances = async (source) => { export const fetchChannelFromInstances = async (source) => {
let cachedLinkIndex = source.instances.indexOf(source.cache.link)
let index = 0 let index = 0
let instances let instances = source.instances
let cachedLink = source.cache.link
let channel let channel
if(cachedLinkIndex !== -1) { if(cachedLink) {
instances = source.instances.toSpliced(cachedLinkIndex, 1) instances.unshift(cachedLink.hostname)
instances.unshift(source.instances[cachedLinkIndex])
} else {
instances = [ ...source.instances ]
} }
while(!channel && index != instances.length) { while(!channel && index != instances.length) {