diff --git a/src/index.js b/src/index.js index cdb6975..6cc5651 100644 --- a/src/index.js +++ b/src/index.js @@ -33,6 +33,9 @@ const hBar = { .then(json => { if (typeof json == "object") { this.normaliseResponse(json[0]); + if (this.postTitle == "undefined" || this.postTitle == undefined) { + return; + } this.render(); } }); @@ -74,6 +77,7 @@ const hBar = { children: [postElement, secondaryElement] }) + document.getElementById('h-bar').innerHTML = "" document.getElementById('h-bar').appendChild(_hbar) }) },