aboutsummaryrefslogtreecommitdiff
path: root/src/client/documents/Documents.ts
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2022-03-04 15:19:09 -0500
committerbobzel <zzzman@gmail.com>2022-03-04 15:19:09 -0500
commitff2602bb598b6e82330a9a0b2453e44d70c94c39 (patch)
tree37a0106c1c23c1bd1c0509cc1e2ebe4e9f703b2b /src/client/documents/Documents.ts
parentc015dc3b76ec30e9d7057ee558787e59033af270 (diff)
removed pseudo Doc type system. playing with hot reloading.
Diffstat (limited to 'src/client/documents/Documents.ts')
-rw-r--r--src/client/documents/Documents.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts
index 3de59ecc3..b81037085 100644
--- a/src/client/documents/Documents.ts
+++ b/src/client/documents/Documents.ts
@@ -662,7 +662,7 @@ export namespace Docs {
export function ImageDocument(url: string, options: DocumentOptions = {}) {
const imgField = new ImageField(url);
- return InstanceFromProto(Prototypes.get(DocumentType.IMG), imgField, { title: url.replace(/.*\//, "") /* path.basename(url)*/, ...options });
+ return InstanceFromProto(Prototypes.get(DocumentType.IMG), imgField, { title: basename(url), ...options });
}
export function PresDocument(initial: List<Doc> = new List(), options: DocumentOptions = {}) {