diff options
author | Bob Zeleznik <zzzman@gmail.com> | 2020-06-29 16:32:01 -0400 |
---|---|---|
committer | Bob Zeleznik <zzzman@gmail.com> | 2020-06-29 16:32:01 -0400 |
commit | e11757174fb539d958595c42ff43f85d82b401c9 (patch) | |
tree | fb32b5358b89de47ba91131ebd0e9e7e70920b67 /src | |
parent | e28fc1fcb0f23d47dfc23dd9e58090b28201289c (diff) |
fixed removing of ';' from script in schemaCells
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/collections/CollectionSchemaCells.tsx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/views/collections/CollectionSchemaCells.tsx b/src/client/views/collections/CollectionSchemaCells.tsx index 5d5f1df57..d76b6d204 100644 --- a/src/client/views/collections/CollectionSchemaCells.tsx +++ b/src/client/views/collections/CollectionSchemaCells.tsx @@ -271,7 +271,7 @@ export class CollectionSchemaCell extends React.Component<CellProps> { } const cscript = cfield instanceof ComputedField ? cfield.script.originalScript : undefined; const cfinalScript = cscript?.split("return")[cscript.split("return").length - 1]; - const val = cscript !== undefined ? `:=${cfinalScript?.substring(0, cfinalScript.length - 2)}` : + const val = cscript !== undefined ? (cfinalScript?.endsWith(";") ? `:=${cfinalScript?.substring(0, cfinalScript.length - 2)}` : cfinalScript) : Field.IsField(cfield) ? Field.toScriptString(cfield) : ""; return val; } |