Skip to content

Commit

Permalink
v2.1.2: fix topbar asri elements' duplication
Browse files Browse the repository at this point in the history
  • Loading branch information
mustakshif committed Feb 13, 2024
1 parent 107b222 commit e24b744
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,10 @@
* @param {node} after
*/
function createTopbarElementById(newId, before = undefined, after = undefined) {
if (document.getElementById(newId)) return;

let newDiv = document.createElement('div');
newDiv.id = newId;

if (before) {
asriDoms.toolbar.insertBefore(newDiv, before);
} else if (after) {
Expand Down

0 comments on commit e24b744

Please sign in to comment.