Skip to content
This repository was archived by the owner on Jun 24, 2025. It is now read-only.

Commit 2dbe3c6

Browse files
authored
Merge pull request #227 from TriliumNext/feature/client_updates
Update client dependencies, Canvas: "Copy image reference to clipboard" no longer working
2 parents 66108c1 + 1eefa65 commit 2dbe3c6

File tree

3 files changed

+53
-54
lines changed

3 files changed

+53
-54
lines changed

package-lock.json

Lines changed: 44 additions & 44 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"dependencies": {
3737
"@braintree/sanitize-url": "6.0.4",
3838
"@electron/remote": "2.1.2",
39-
"@excalidraw/excalidraw": "0.17.3",
39+
"@excalidraw/excalidraw": "^0.17.6",
4040
"archiver": "7.0.0",
4141
"async-mutex": "0.4.1",
4242
"axios": "1.6.7",
@@ -75,9 +75,9 @@
7575
"jquery": "3.7.1",
7676
"jquery-hotkeys": "0.2.2",
7777
"jsdom": "24.0.0",
78-
"katex": "0.16.9",
78+
"katex": "^0.16.11",
7979
"marked": "12.0.0",
80-
"mermaid": "10.9.0",
80+
"mermaid": "^10.9.1",
8181
"mime-types": "2.1.35",
8282
"multer": "1.4.5-lts.1",
8383
"node-abi": "3.56.0",
@@ -86,8 +86,8 @@
8686
"panzoom": "9.4.3",
8787
"print-this": "2.0.0",
8888
"rand-token": "1.0.1",
89-
"react": "18.2.0",
90-
"react-dom": "18.2.0",
89+
"react": "^18.3.1",
90+
"react-dom": "^18.3.1",
9191
"request": "2.88.2",
9292
"rimraf": "5.0.5",
9393
"safe-compare": "1.1.4",

src/routes/api/image.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,22 +41,21 @@ function returnImageInt(image: BNote | BRevision | null, res: Response) {
4141
}
4242

4343
function renderSvgAttachment(image: BNote | BRevision, res: Response, attachmentName: string) {
44-
let svgString = '<svg/>'
44+
let svg: string | Buffer = '<svg/>'
4545
const attachment = image.getAttachmentByTitle(attachmentName);
4646

4747
const content = attachment.getContent();
48-
if (attachment && typeof content === "string") {
49-
svgString = content;
48+
if (attachment) {
49+
svg = content;
5050
} else {
5151
// backwards compatibility, before attachments, the SVG was stored in the main note content as a separate key
5252
const contentSvg = image.getJsonContentSafely()?.svg;
5353

5454
if (contentSvg) {
55-
svgString = contentSvg;
55+
svg = contentSvg;
5656
}
5757
}
5858

59-
const svg = svgString
6059
res.set('Content-Type', "image/svg+xml");
6160
res.set("Cache-Control", "no-cache, no-store, must-revalidate");
6261
res.send(svg);

0 commit comments

Comments
 (0)