Skip to content

Commit

Permalink
Fix null reference in toggle entry attachments shortcut
Browse files Browse the repository at this point in the history
Fixes #1723
  • Loading branch information
fguillot committed Mar 14, 2023
1 parent ea8c3c8 commit 9ae6922
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ui/static/js/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,12 @@ document.addEventListener("DOMContentLoaded", function () {
keyboardHandler.on("+", () => goToAddSubscription());
keyboardHandler.on("#", () => unsubscribeFromFeed());
keyboardHandler.on("/", (e) => setFocusToSearchInput(e));
keyboardHandler.on("a", () => document.querySelector('.entry-enclosures').toggleAttribute('open'));
keyboardHandler.on("a", () => {
let enclosureElement = document.querySelector('.entry-enclosures');
if (enclosureElement) {
enclosureElement.toggleAttribute('open');
}
});
keyboardHandler.on("Escape", () => ModalHandler.close());
keyboardHandler.listen();
}
Expand Down

0 comments on commit 9ae6922

Please sign in to comment.