Skip to content

Commit ef2b113

Browse files
committed
Fix non-string defaults in dbml export
1 parent 0b91d9f commit ef2b113

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/utils/exportAs/dbml.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ function parseDefaultDbml(field, database) {
2929
}
3030

3131
function columnDefault(field, database) {
32-
if (!field.default || field.default.trim() === "") {
32+
if (!field.default) {
33+
return "";
34+
}
35+
36+
if (typeof field.default === "string" && !field.default.trim()) {
3337
return "";
3438
}
3539

0 commit comments

Comments
 (0)