diff options
author | 0x85FB9C51 <77808164+0x85FB9C51@users.noreply.github.com> | 2021-07-08 10:28:08 -0400 |
---|---|---|
committer | 0x85FB9C51 <77808164+0x85FB9C51@users.noreply.github.com> | 2021-07-08 10:28:08 -0400 |
commit | dc4d29e7aef46d856f59e2f45f0016de45df78a7 (patch) | |
tree | 1cc6e6ffe28c830037d2a577523683a03a5c1709 /src | |
parent | 0ac0b74de8578062aa7f700779613ff0e18a12ea (diff) |
minor bugfix for numbers with commas and periods
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/collections/schemaView/CollectionSchemaCells.tsx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/views/collections/schemaView/CollectionSchemaCells.tsx b/src/client/views/collections/schemaView/CollectionSchemaCells.tsx index f2df87d71..f75179cea 100644 --- a/src/client/views/collections/schemaView/CollectionSchemaCells.tsx +++ b/src/client/views/collections/schemaView/CollectionSchemaCells.tsx @@ -33,6 +33,7 @@ import "./CollectionSchemaView.scss"; import { CollectionView } from "../CollectionView"; const path = require('path'); +// intialize cell properties export interface CellProps { row: number; col: number; @@ -246,7 +247,7 @@ export class CollectionSchemaCell extends React.Component<CellProps> { // check if the input is a number let inputIsNum = true; for (let s of value) { - if (isNaN(parseInt(s))) { + if (isNaN(parseInt(s)) && !(s == ".") && !(s == ",")) { inputIsNum = false; } } @@ -373,7 +374,7 @@ export class CollectionSchemaDocCell extends CollectionSchemaCell { const script = CompileScript(value, { addReturn: true, - typecheck: false, + typecheck: true, transformer: DocumentIconContainer.getTransformer() }); |