Skip to content

Commit

Permalink
Fix reading instances from the Invidious fallback file (FreeTubeApp#3712
Browse files Browse the repository at this point in the history
)
  • Loading branch information
absidue authored Jun 28, 2023
1 parent d989af2 commit afffbf6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/renderer/store/modules/invidious.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const actions = {
const filePath = `${fileLocation}${fileName}`
if (!process.env.IS_ELECTRON || await pathExists(filePath)) {
console.warn('reading static file for invidious instances')
const fileData = process.env.IS_ELECTRON ? JSON.parse(await fs.readFile(filePath)) : await (await fetch(createWebURL(filePath))).text()
const fileData = process.env.IS_ELECTRON ? await fs.readFile(filePath, 'utf8') : await (await fetch(createWebURL(filePath))).text()
instances = JSON.parse(fileData).filter(e => {
return process.env.IS_ELECTRON || e.cors
}).map(e => {
Expand Down

0 comments on commit afffbf6

Please sign in to comment.