0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-27 15:52:39 +00:00

Fix scroll PR when no hash

This commit is contained in:
Trevor Buckner
2024-10-23 13:45:10 -04:00
committed by GitHub
parent ef5e3ddf4c
commit 6373c398bc

View File

@@ -78,6 +78,8 @@ const BrewRenderer = (props)=>{
}
const scrollToHash = (hash) => {
if (!hash) return;
const iframeDoc = document.getElementById('BrewRenderer').contentDocument;
let anchor = iframeDoc.querySelector(hash);