0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

Fixed local dev env crashing

This commit is contained in:
Peter Zimon 2022-07-05 11:22:48 +02:00
parent ea54c073c3
commit eb10f02e5f
2 changed files with 19 additions and 5 deletions

View file

@ -589,6 +589,14 @@ video {
padding: 0.8rem;
}
.p-\[calc\(21px\+10\%\)\] {
padding: calc(21px + 10%);
}
.p-4 {
padding: 1.6rem;
}
.text-xl {
font-size: 2rem;
}

View file

@ -7,6 +7,11 @@ const ROOT_DIV_ID = 'ghost-comments-root';
function addRootDiv() {
const scriptTag = document.querySelector('script[data-ghost-comments]');
if (process.env.NODE_ENV === 'development') {
const elem = document.createElement('div');
elem.id = ROOT_DIV_ID;
document.body.appendChild(elem);
} else {
// We need to inject the comment box at the same place as the script tag
if (scriptTag) {
const elem = document.createElement('div');
@ -17,6 +22,7 @@ function addRootDiv() {
console.warn('Comment box location was not found: could not load comments box.');
}
}
}
function getSiteData() {
/**