generic-github-user / Star

A website where anyone can rate anything.
0 stars 1 forks source link

Only display note if post contains a note #19

Closed generic-github-user closed 6 years ago

generic-github-user commented 6 years ago

Currently, posts without notes display undefined in place of a note.

image

generic-github-user commented 6 years ago

This will also help with compatibility between newer and older posts: #14

generic-github-user commented 6 years ago

Added if statement to check if post contains a note:

if (post.note) {
      var post_note = document.createElement("h5");
      post_note.innerHTML = post.note;
      post_main.appendChild(document.createElement("br"));
      post_main.appendChild(document.createElement("br"));
      post_main.appendChild(post_note);
}
generic-github-user commented 6 years ago

image