mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-04 21:12:41 +00:00
Cleanup
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
/*eslint max-lines: ["warn", {"max": 300, "skipBlankLines": true, "skipComments": true}]*/
|
/*eslint max-lines: ["warn", {"max": 300, "skipBlankLines": true, "skipComments": true}]*/
|
||||||
require('./brewRenderer.less');
|
require('./brewRenderer.less');
|
||||||
const React = require('react');
|
const React = require('react');
|
||||||
const { useState, useRef, useCallback, useMemo, useEffect } = React;
|
const { useState, useRef, useCallback, useMemo } = React;
|
||||||
const _ = require('lodash');
|
const _ = require('lodash');
|
||||||
|
|
||||||
const MarkdownLegacy = require('naturalcrit/markdownLegacy.js');
|
const MarkdownLegacy = require('naturalcrit/markdownLegacy.js');
|
||||||
@@ -78,8 +78,7 @@ const BrewRenderer = (props)=>{
|
|||||||
}
|
}
|
||||||
|
|
||||||
const scrollToHash = (hash) => {
|
const scrollToHash = (hash) => {
|
||||||
const iframe = document.getElementById('BrewRenderer');
|
const iframeDoc = document.getElementById('BrewRenderer').contentDocument;
|
||||||
const iframeDoc = iframe?.contentDocument || iframe?.contentWindow?.document;
|
|
||||||
let anchor = iframeDoc.querySelector(hash);
|
let anchor = iframeDoc.querySelector(hash);
|
||||||
|
|
||||||
if (anchor) {
|
if (anchor) {
|
||||||
|
|||||||
Reference in New Issue
Block a user