From dc4d29e7aef46d856f59e2f45f0016de45df78a7 Mon Sep 17 00:00:00 2001 From: 0x85FB9C51 <77808164+0x85FB9C51@users.noreply.github.com> Date: Thu, 8 Jul 2021 10:28:08 -0400 Subject: minor bugfix for numbers with commas and periods --- src/client/views/collections/schemaView/CollectionSchemaCells.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') 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 { // 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() }); -- cgit v1.2.3-70-g09d2