mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-08-14 23:57:27 +00:00
Use for of loop
Co-authored-by: Bnyro <82752168+Bnyro@users.noreply.github.com>
This commit is contained in:
parent
de50a8fc6c
commit
bbc06f32b3
1 changed files with 6 additions and 7 deletions
|
@ -106,13 +106,12 @@ export default {
|
|||
// FreeTube DB
|
||||
else if (text.indexOf("allChannels") != -1) {
|
||||
const lines = text.split("\n");
|
||||
for (let i = 0; i < lines.length; i++) {
|
||||
if (lines[i] !== "") {
|
||||
const json = JSON.parse(lines[i]);
|
||||
json.subscriptions.forEach(item => {
|
||||
this.subscriptions.push(item.id);
|
||||
});
|
||||
}
|
||||
for (let line of lines) {
|
||||
if (line === "") continue;
|
||||
const json = JSON.parse(line);
|
||||
json.subscriptions.forEach(item => {
|
||||
this.subscriptions.push(item.id);
|
||||
});
|
||||
}
|
||||
}
|
||||
// Google Takeout JSON
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue