We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 14ee753 commit 34a9b5fCopy full SHA for 34a9b5f
src/utils/utils.js
@@ -43,14 +43,12 @@ export function isFunction(str) {
43
return /\w+\([^)]*\)$/.test(str);
44
}
45
46
-export function areFieldsCompatible(db, field1, field2) {
47
- const same = field1.type === field2.type;
48
- if (dbToTypes[db][field1.type].compatibleWith) {
49
- return (
50
- dbToTypes[db][field1.type].compatibleWith.includes(field2.type) || same
51
- );
52
- }
53
- return same;
+export function areFieldsCompatible(db, field1Type, field2Type) {
+ const same = field1Type === field2Type;
+ const isCompatible =
+ dbToTypes[db][field1Type].compatibleWith &&
+ dbToTypes[db][field1Type].compatibleWith.includes(field2Type);
+ return same || isCompatible;
54
55
56
export function getTableHeight(table) {
0 commit comments