fix: account for letter casing while creating editing a collection

This commit is contained in:
jamesgeorge007
2020-02-03 17:38:38 +05:30
parent 88fc45975f
commit 955bb5c99d

View File

@@ -133,7 +133,7 @@ export const mutations = {
editCollection({ collections }, payload) {
const { collection, collectionIndex } = payload;
const { name } = collection;
const duplicateCollection = collections.some(item => item.name === name);
const duplicateCollection = collections.some(item => item.name.toLowerCase() === name.toLowerCase());
if (duplicateCollection) {
this.$toast.info("Duplicate collection");
return;