diff --git a/.gitignore b/.gitignore index 82b7513e..eb8ebb84 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ coverage __coverage__ csak-timelog.json .idea/ +debug/ diff --git a/src/renderer/components/data-settings/data-settings.js b/src/renderer/components/data-settings/data-settings.js index dca95ee1..020fc6e4 100644 --- a/src/renderer/components/data-settings/data-settings.js +++ b/src/renderer/components/data-settings/data-settings.js @@ -265,7 +265,11 @@ export default Vue.extend({ 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) }