mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-27 21:01:03 +08:00
Mute MaybeFullPage error
This commit is contained in:
parent
f1906bc2b2
commit
59e5c95346
@ -15,6 +15,11 @@ export default function MaybeFullPage({
|
||||
|
||||
const scriptString = `(([id]) => {
|
||||
const el = document.getElementById(id);
|
||||
if (!el) {
|
||||
// this may happen occasionally when the element is removed by React or another library
|
||||
// just ignore it
|
||||
return;
|
||||
}
|
||||
const offset = el.getBoundingClientRect().top + document.documentElement.scrollTop;
|
||||
el.style.minHeight = \`calc(100vh - \${offset}px)\`;
|
||||
})(${JSON.stringify([id])})`;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user