diff --git a/src/main/resources/META-INF/resources/bookmarks/MlkBookmarkSubmissionForm.js b/src/main/resources/META-INF/resources/bookmarks/MlkBookmarkSubmissionForm.js
index 3b93305..7c71518 100644
--- a/src/main/resources/META-INF/resources/bookmarks/MlkBookmarkSubmissionForm.js
+++ b/src/main/resources/META-INF/resources/bookmarks/MlkBookmarkSubmissionForm.js
@@ -74,9 +74,10 @@
 
   get editedId() /*:number | null*/ {
     let attr = this.getAttribute("edited-id");
-    if (attr === undefined || attr === null) {
+    if (attr === null) {
       return null;
     }
+
     return parseInt(attr, 10);
   }
 
diff --git a/src/main/resources/META-INF/resources/lazychat/MlkLazychatSubmissionForm.js b/src/main/resources/META-INF/resources/lazychat/MlkLazychatSubmissionForm.js
index 4c4aca8..7bd6d4d 100644
--- a/src/main/resources/META-INF/resources/lazychat/MlkLazychatSubmissionForm.js
+++ b/src/main/resources/META-INF/resources/lazychat/MlkLazychatSubmissionForm.js
@@ -58,9 +58,10 @@
 
   get editedId() /*:number | null*/ {
     let attr = this.getAttribute("edited-id");
-    if (attr === undefined || attr === null) {
+    if (attr === null) {
       return null;
     }
+
     return parseInt(attr, 10);
   }
 
diff --git a/src/main/resources/META-INF/resources/posts/postList.js b/src/main/resources/META-INF/resources/posts/postList.js
index 8ffb7ca..1b6f9f5 100644
--- a/src/main/resources/META-INF/resources/posts/postList.js
+++ b/src/main/resources/META-INF/resources/posts/postList.js
@@ -2,21 +2,21 @@
   let bookmarkSubmissionPane = document.getElementById('bookmark-submission-pane');
   if (bookmarkSubmissionPane) {
     let bookmarkSubmissionForm = document.getElementById('bookmark-submission-form');
-    bookmarkSubmissionPane.addEventListener('opened',() => bookmarkSubmissionForm.focus());
+    bookmarkSubmissionPane.addEventListener('opened', () => bookmarkSubmissionForm.focus());
   }
 
   let lazychatSubmissionPane = document.getElementById('lazychat-submission-pane');
   if (lazychatSubmissionPane) {
     let lazychatSubmissionForm = document.getElementById('lazychat-submission-form');
-    lazychatSubmissionPane.addEventListener('opened',() => lazychatSubmissionForm.focus());
+    lazychatSubmissionPane.addEventListener('opened', () => lazychatSubmissionForm.focus());
   }
 
   let lazychatMessages = document.getElementsByClassName('lazychat-message');
   for (let message of lazychatMessages) {
-    let editorPane = message.getElementsByClassName('lazychat-editor-pane')[0];
+    let [editorPane] = message.getElementsByClassName('lazychat-editor-pane');
     if (editorPane) {
-      let form = message.getElementsByTagName('mlk-lazychat-submission-form')[0];
-      let editButton = message.getElementsByClassName('lazychat-edit-button')[0];
+      let [form] = message.getElementsByTagName('mlk-lazychat-submission-form');
+      let [editButton] = message.getElementsByClassName('lazychat-edit-button');
       editButton.addEventListener('click', () => {
         editorPane.toggle();
         form.focus();
@@ -26,10 +26,10 @@
 
   let bookmarks = document.getElementsByClassName('bookmark');
   for (let bookmark of bookmarks) {
-    let editorPane = bookmark.getElementsByClassName('editor-pane')[0];
+    let [editorPane] = bookmark.getElementsByClassName('editor-pane');
     if (editorPane) {
-      let form = bookmark.getElementsByTagName('mlk-bookmark-submission-form')[0];
-      let editButton = bookmark.getElementsByClassName('bookmark-edit-button')[0];
+      let [form] = bookmark.getElementsByTagName('mlk-bookmark-submission-form');
+      let [editButton] = bookmark.getElementsByClassName('bookmark-edit-button');
       editButton.addEventListener('click', () => {
         editorPane.toggle();
         form.focus();
