@@ -568,6 +568,8 @@ const createAttribute = (databaseId, collectionId, attribute) => {
568
568
onDelete: attribute.onDelete,
569
569
parseOutput: false
570
570
})
571
+ default:
572
+ throw new Error(`Unsupported attribute type: ${attribute.type}`);
571
573
}
572
574
}
573
575
@@ -641,7 +643,7 @@ const updateAttribute = (databaseId, collectionId, attribute) => {
641
643
array: attribute.array,
642
644
parseOutput: false
643
645
})
644
- case 'double ':
646
+ case 'float ':
645
647
return databasesUpdateFloatAttribute({
646
648
databaseId,
647
649
collectionId,
@@ -685,6 +687,8 @@ const updateAttribute = (databaseId, collectionId, attribute) => {
685
687
onDelete: attribute.onDelete,
686
688
parseOutput: false
687
689
})
690
+ default:
691
+ throw new Error(`Unsupported attribute type: ${attribute.type}`);
688
692
}
689
693
}
690
694
const deleteAttribute = async (collection, attribute, isIndex = false) => {
@@ -753,7 +757,7 @@ const checkAttributeChanges = (remote, local, collection, recraeting = true) =>
753
757
754
758
if (changeableKeys.includes(key)) {
755
759
if (!recraeting) {
756
- reason + = compareAttribute(remote[key], local[key], reason, key)
760
+ reason = compareAttribute(remote[key], local[key], reason, key)
757
761
}
758
762
continue;
759
763
}
@@ -762,7 +766,7 @@ const checkAttributeChanges = (remote, local, collection, recraeting = true) =>
762
766
continue;
763
767
}
764
768
765
- reason + = compareAttribute(remote[key], local[key], reason, key)
769
+ reason = compareAttribute(remote[key], local[key], reason, key)
766
770
}
767
771
768
772
return reason === '' ? undefined : { key: keyName, attribute, reason, action };
0 commit comments