Skip to content

Commit

Permalink
fix: wrong detection of field default expressions in some cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabio286 committed May 25, 2021
1 parent c568aca commit 04bdd08
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/renderer/components/WorkspacePropsTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -239,11 +239,11 @@ export default {
field.defaultType = 'noval';
else if (field.default === 'NULL')
field.defaultType = 'null';
else if (field.default.match(/^\s*(\w+)\s*\((.*)\)$/))
else if (isNaN(+field.default) && field.default.charAt(0) !== '\'')
field.defaultType = 'expression';
else {
field.defaultType = 'custom';
if (isNaN(field.default) && !field.default.includes('\''))
if (isNaN(+field.default) && !field.default.includes('\''))
field.default = `'${field.default}'`;
}
Expand Down

0 comments on commit 04bdd08

Please sign in to comment.