aboutsummaryrefslogtreecommitdiff
path: root/src/client/DocServer.ts
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2024-04-19 11:32:46 -0400
committerbobzel <zzzman@gmail.com>2024-04-19 11:32:46 -0400
commit89e5b4e224d77c7a029ec7d9c9027095665508ac (patch)
treeb1163d7090da48d978858caa44c601401a9400f6 /src/client/DocServer.ts
parentb6229b0a6141afbfd0e78e3ec870218187864def (diff)
lint fixes.
Diffstat (limited to 'src/client/DocServer.ts')
-rw-r--r--src/client/DocServer.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/client/DocServer.ts b/src/client/DocServer.ts
index 804e6d1d7..b833d3287 100644
--- a/src/client/DocServer.ts
+++ b/src/client/DocServer.ts
@@ -102,7 +102,7 @@ export namespace DocServer {
}
export function getFieldWriteMode(field: string) {
- return ClientUtils.CurrentUserEmail === 'guest' ? WriteMode.LivePlayground : fieldWriteModes[field] || WriteMode.Default;
+ return ClientUtils.CurrentUserEmail() === 'guest' ? WriteMode.LivePlayground : fieldWriteModes[field] || WriteMode.Default;
}
export function registerDocWithCachedUpdate(doc: Doc, field: string, oldValue: any) {
@@ -463,7 +463,7 @@ export namespace DocServer {
function _CreateFieldImpl(field: RefField) {
_cache[field[Id]] = field;
const initialState = SerializationHelper.Serialize(field);
- ClientUtils.CurrentUserEmail !== 'guest' && DocServer.Emit(_socket, MessageStore.CreateField, initialState);
+ ClientUtils.CurrentUserEmail() !== 'guest' && DocServer.Emit(_socket, MessageStore.CreateField, initialState);
}
// NOTIFY THE SERVER OF AN UPDATE TO A DOC'S STATE
@@ -481,7 +481,7 @@ export namespace DocServer {
}
function _UpdateFieldImpl(id: string, diff: any) {
- !DocServer.Control.isReadOnly() && ClientUtils.CurrentUserEmail !== 'guest' && DocServer.Emit(_socket, MessageStore.UpdateField, { id, diff });
+ !DocServer.Control.isReadOnly() && ClientUtils.CurrentUserEmail() !== 'guest' && DocServer.Emit(_socket, MessageStore.UpdateField, { id, diff });
}
function _respondToUpdateImpl(diff: any) {
@@ -516,11 +516,11 @@ export namespace DocServer {
}
export function DeleteDocument(id: string) {
- ClientUtils.CurrentUserEmail !== 'guest' && DocServer.Emit(_socket, MessageStore.DeleteField, id);
+ ClientUtils.CurrentUserEmail() !== 'guest' && DocServer.Emit(_socket, MessageStore.DeleteField, id);
}
export function DeleteDocuments(ids: string[]) {
- ClientUtils.CurrentUserEmail !== 'guest' && DocServer.Emit(_socket, MessageStore.DeleteFields, ids);
+ ClientUtils.CurrentUserEmail() !== 'guest' && DocServer.Emit(_socket, MessageStore.DeleteFields, ids);
}
function _respondToDeleteImpl(ids: string | string[]) {