mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 11:55:03 +03:00
Fixed announcement bar insertion
no issue - Checked if react root div was already inserted to avoid duplication.
This commit is contained in:
parent
b6320ca976
commit
b893ec13ab
@ -6,6 +6,10 @@ import {App} from './App';
|
||||
const ROOT_DIV_ID = 'announcement-bar-root';
|
||||
|
||||
function addRootDiv() {
|
||||
if (document.getElementById(ROOT_DIV_ID)) {
|
||||
return;
|
||||
}
|
||||
|
||||
const elem = document.createElement('div');
|
||||
elem.id = ROOT_DIV_ID;
|
||||
document.body.prepend(elem);
|
||||
|
Loading…
Reference in New Issue
Block a user