Fix reveal (#1563)

Fix race condition in slide show

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2021-10-16 21:45:22 +02:00 committed by GitHub
parent 3958ef550d
commit e84ed1398f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 84 additions and 19 deletions

View file

@ -8,7 +8,7 @@ import React, { useCallback, useEffect, useRef } from 'react'
export const useExtractFirstHeadline = (
documentElement: React.RefObject<HTMLDivElement>,
content: string,
content: string | undefined,
onFirstHeadingChange?: (firstHeading: string | undefined) => void
): void => {
const extractInnerText = useCallback((node: ChildNode | null): string => {