diff options
author | Sam Wilkins <samwilkins333@gmail.com> | 2019-02-25 01:31:27 -0500 |
---|---|---|
committer | Sam Wilkins <samwilkins333@gmail.com> | 2019-02-25 01:31:27 -0500 |
commit | 1a32bdca177faf5a3d99bcb45aaf596ba8c706a8 (patch) | |
tree | 1f7531be1ae4032cbb5de0e54a9ae48fda9657cc /src/server/ServerUtil.ts | |
parent | b418a6ed64e50700e2935963f01e392cbd81099d (diff) | |
parent | db7aa80be56e2d91acf224013b24ab73385f836c (diff) |
Merge branch 'authentication' of https://github.com/browngraphicslab/Dash-Web into authentication
Diffstat (limited to 'src/server/ServerUtil.ts')
-rw-r--r-- | src/server/ServerUtil.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/server/ServerUtil.ts b/src/server/ServerUtil.ts index 46c409ec4..08e72fdae 100644 --- a/src/server/ServerUtil.ts +++ b/src/server/ServerUtil.ts @@ -9,6 +9,7 @@ import { Document } from './../fields/Document'; import { Server } from './../client/Server'; import { Types } from './Message'; import { Utils } from '../Utils'; +import { HtmlField } from '../fields/HtmlField'; export class ServerUtils { public static FromJson(json: any): Field { @@ -27,6 +28,8 @@ export class ServerUtils { return new NumberField(data, id, false) case Types.Text: return new TextField(data, id, false) + case Types.Html: + return new HtmlField(data, id, false) case Types.RichText: return new RichTextField(data, id, false) case Types.Key: @@ -42,7 +45,8 @@ export class ServerUtils { doc._proxies.set(element[0], element[1]); }); return doc + default: + throw Error("Error, unrecognized field type received from server. If you just created a new field type, be sure to add it here"); } - return new TextField(data, id) } }
\ No newline at end of file |