mirror of
https://github.com/drawdb-io/drawdb.git
synced 2025-07-18 10:11:24 +00:00
Fix are fields compatible (#484)
This commit is contained in:
@@ -43,14 +43,12 @@ export function isFunction(str) {
|
|||||||
return /\w+\([^)]*\)$/.test(str);
|
return /\w+\([^)]*\)$/.test(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function areFieldsCompatible(db, field1, field2) {
|
export function areFieldsCompatible(db, field1Type, field2Type) {
|
||||||
const same = field1.type === field2.type;
|
const same = field1Type === field2Type;
|
||||||
if (dbToTypes[db][field1.type].compatibleWith) {
|
const isCompatible =
|
||||||
return (
|
dbToTypes[db][field1Type].compatibleWith &&
|
||||||
dbToTypes[db][field1.type].compatibleWith.includes(field2.type) || same
|
dbToTypes[db][field1Type].compatibleWith.includes(field2Type);
|
||||||
);
|
return same || isCompatible;
|
||||||
}
|
|
||||||
return same;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getTableHeight(table) {
|
export function getTableHeight(table) {
|
||||||
|
Reference in New Issue
Block a user