Merge pull request #902 from GilgusMaximus/development
Added check for duplicate in YouTube JSON file
This commit is contained in:
commit
c9c1e4c3e0
|
@ -20,3 +20,4 @@ coverage
|
||||||
__coverage__
|
__coverage__
|
||||||
csak-timelog.json
|
csak-timelog.json
|
||||||
.idea/
|
.idea/
|
||||||
|
debug/
|
||||||
|
|
|
@ -265,7 +265,11 @@ export default Vue.extend({
|
||||||
return sub.id === subscription.id || sub.name === subscription.name
|
return sub.id === subscription.id || sub.name === subscription.name
|
||||||
})
|
})
|
||||||
|
|
||||||
if (subExists === -1) {
|
const subDuplicateExists = subscriptions.findIndex((sub) => {
|
||||||
|
return sub.id === subscription.id || sub.name === subscription.name
|
||||||
|
})
|
||||||
|
|
||||||
|
if (subExists === -1 && subDuplicateExists === -1) {
|
||||||
subscriptions.push(subscription)
|
subscriptions.push(subscription)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue