We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0931bab commit 5bd1a88Copy full SHA for 5bd1a88
src/block/heading/edit.js
@@ -103,11 +103,12 @@ const Edit = props => {
103
// Auto-generate anchors in Stackable headings.
104
const [ prevText, setPrevText ] = useState( props.attributes.text )
105
const updateTimeout = useRef( null )
106
+ const isFirstRender = useRef( true )
107
108
useEffect( () => {
109
// Use updateTimeout to skip effect on first render
- if ( updateTimeout.current === null ) {
110
- updateTimeout.current = true
+ if ( isFirstRender.current ) {
111
+ isFirstRender.current = false
112
return
113
}
114
0 commit comments