Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

fix: crash due to wrong querySelector

thecodrr936887a97243
diff --git a/apps/web/src/components/diff-viewer/diff.css b/apps/web/src/components/diff-viewer/diff.css
index 118a3130e..01b2d8734 100644
--- a/apps/web/src/components/diff-viewer/diff.css
+++ b/apps/web/src/components/diff-viewer/diff.css
@@ -7,6 +7,7 @@ span.diff-ins {
}
.diffviewer img {
+ height: auto !important;
max-width: 100% !important;
background-color: var(--bgSecondary);
border-radius: 5px;
diff --git a/apps/web/src/components/diff-viewer/index.js b/apps/web/src/components/diff-viewer/index.js
index 652b75a89..3c4f46cc8 100644
--- a/apps/web/src/components/diff-viewer/index.js
+++ b/apps/web/src/components/diff-viewer/index.js
@@ -213,7 +213,7 @@ function DiffViewer(props) {
EVENTS.mediaAttachmentDownloaded,
({ hash, src }) => {
const elements = document.querySelectorAll(
- `.diffviewer img[data-hash=${hash}]`
+ `.diffviewer img[data-hash="${hash}"]`
);
if (!elements || !elements.length) return;
for (let element of elements) element.setAttribute("src", src);