0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-25 20:33:51 +00:00
This commit is contained in:
Trevor Buckner
2024-10-22 13:52:34 -04:00
parent 5b136f651c
commit 9fbdd24d01

View File

@@ -1,7 +1,7 @@
/*eslint max-lines: ["warn", {"max": 300, "skipBlankLines": true, "skipComments": true}]*/
require('./brewRenderer.less');
const React = require('react');
const { useState, useRef, useCallback, useMemo, useEffect } = React;
const { useState, useRef, useCallback, useMemo } = React;
const _ = require('lodash');
const MarkdownLegacy = require('naturalcrit/markdownLegacy.js');
@@ -78,8 +78,7 @@ const BrewRenderer = (props)=>{
}
const scrollToHash = (hash) => {
const iframe = document.getElementById('BrewRenderer');
const iframeDoc = iframe?.contentDocument || iframe?.contentWindow?.document;
const iframeDoc = document.getElementById('BrewRenderer').contentDocument;
let anchor = iframeDoc.querySelector(hash);
if (anchor) {