diff options
| author | usodhi <61431818+usodhi@users.noreply.github.com> | 2020-07-01 10:00:26 +0530 |
|---|---|---|
| committer | usodhi <61431818+usodhi@users.noreply.github.com> | 2020-07-01 10:00:26 +0530 |
| commit | b46025f3f12fa2de509800c03b89bac375d59c99 (patch) | |
| tree | 72e30988aa94948b728f73836c4e3c4166358dcc /src/fields | |
| parent | b9eb75e743ceaf8540a7a7d3b6f08b42e75de25c (diff) | |
| parent | 6af97864aabe89153487d37bf78391ff525deadd (diff) | |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into acls_uv
Diffstat (limited to 'src/fields')
| -rw-r--r-- | src/fields/DateField.ts | 4 | ||||
| -rw-r--r-- | src/fields/util.ts | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/fields/DateField.ts b/src/fields/DateField.ts index a925148c2..bee62663e 100644 --- a/src/fields/DateField.ts +++ b/src/fields/DateField.ts @@ -29,6 +29,10 @@ export class DateField extends ObjectField { [ToString]() { return this.date.toISOString(); } + + getDate() { + return this.date; + } } Scripting.addGlobal(function d(...dateArgs: any[]) { diff --git a/src/fields/util.ts b/src/fields/util.ts index 2869ebed1..2dc21c987 100644 --- a/src/fields/util.ts +++ b/src/fields/util.ts @@ -78,7 +78,7 @@ const _setterImpl = action(function (target: any, prop: string | symbol | number } else { target.__fields[prop] = value; } - if (typeof value === "object" && !(value instanceof ObjectField)) debugger; + //if (typeof value === "object" && !(value instanceof ObjectField)) debugger; if (writeToServer) { if (value === undefined) target[Update]({ '$unset': { ["fields." + prop]: "" } }); else target[Update]({ '$set': { ["fields." + prop]: value instanceof ObjectField ? SerializationHelper.Serialize(value) : (value === undefined ? null : value) } }); |
