diff --git a/.gitignore b/.gitignore index 82b7513e0..eb8ebb84b 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 dca95ee1e..020fc6e4a 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) }