fix
This commit is contained in:
parent
f3fa69afcb
commit
2519cb3196
|
|
@ -8,11 +8,13 @@ import { user } from "../entity/user";
|
||||||
import { gzipAsync } from "../entity/zlib";
|
import { gzipAsync } from "../entity/zlib";
|
||||||
import { sendWS } from "../sync-handler";
|
import { sendWS } from "../sync-handler";
|
||||||
import { SyncConnection, SyncType } from "../type";
|
import { SyncConnection, SyncType } from "../type";
|
||||||
|
import { validate } from "uuid";
|
||||||
export const page_load: SAction["page"]["load"] = async function (
|
export const page_load: SAction["page"]["load"] = async function (
|
||||||
this: SyncConnection,
|
this: SyncConnection,
|
||||||
id: string
|
id: string
|
||||||
) {
|
) {
|
||||||
|
if (!id || (id && !validate(id))) return;
|
||||||
|
|
||||||
let snap = snapshot.get("page", id);
|
let snap = snapshot.get("page", id);
|
||||||
let ydoc = docs.page[id];
|
let ydoc = docs.page[id];
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue