From be53a5a9122d0a6caa27810e34544578abb4c573 Mon Sep 17 00:00:00 2001
From: 0x85FB9C51 <77808164+0x85FB9C51@users.noreply.github.com>
Date: Thu, 1 Jul 2021 17:08:57 -0400
Subject: fixed minor bug that prevented strings in quotes from being saved

---
 src/client/views/collections/CollectionSchemaCells.tsx | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

(limited to 'src/client/views/collections/CollectionSchemaCells.tsx')

diff --git a/src/client/views/collections/CollectionSchemaCells.tsx b/src/client/views/collections/CollectionSchemaCells.tsx
index 42c5375ce..e9c5c009f 100644
--- a/src/client/views/collections/CollectionSchemaCells.tsx
+++ b/src/client/views/collections/CollectionSchemaCells.tsx
@@ -249,11 +249,10 @@ export class CollectionSchemaCell extends React.Component<CellProps> {
                                             if (isNaN(parseInt(s))) {
                                                 inputIsNum = false;
                                             }
-                                            console.log(inputIsNum);
                                         }
                                         // check if the input is a boolean
                                         let inputIsBool: boolean = value == "false" || value == "true";
-
+                                        // what to do in the case 
                                         if (!inputIsNum && !inputIsBool && !value.startsWith("=")) {
                                             // if it's not a number, it's a string, and should be processed as such
                                             // strips the string of quotes when it is edited to prevent quotes form being added to the text automatically 
@@ -278,7 +277,7 @@ export class CollectionSchemaCell extends React.Component<CellProps> {
                                             inputAsString += '"';
                                             //two options here: we can strip off outer quotes or we can figure out what's going on with the script
                                             const script = CompileScript(inputAsString, { requiredType: type, typecheck: false, editable: true, addReturn: true, params: { this: Doc.name, $r: "number", $c: "number", $: "any" } });
-                                            script.compiled && (retVal = this.applyToDoc(inputAsString.length !== value.length ? this._rowDoc : this._rowDataDoc, this.props.row, this.props.col, script.run));
+                                            script.compiled && (retVal = this.applyToDoc((inputAsString.length !== value.length || inputAsString.length - 2 !== value.length) ? this._rowDoc : this._rowDataDoc, this.props.row, this.props.col, script.run));
                                             // handle numbers and expressions
                                         } else if (inputIsNum || value.startsWith("=")) {
                                             //TODO: make accept numbers
-- 
cgit v1.2.3-70-g09d2

