Skip to content

Commit

Permalink
- Fixed bug: Clear fitToSectionDelay when declaring setFitToSection(f…
Browse files Browse the repository at this point in the history
…alse) #4590
  • Loading branch information
alvarotrigo committed Jul 23, 2024
1 parent 0de17a2 commit 386f92f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/js/fitToSection.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { setVariableState } from './common/options.js';
import { getOptions, setVariableState } from './common/options.js';
import { FP } from './common/constants.js';
import { setState, state } from './common/state.js';
import { scrollPage } from './scroll/scrollPage.js';
Expand All @@ -18,7 +18,7 @@ export function setFitToSection(value, type){
*/
export function fitToSection(){
//checking fitToSection again in case it was set to false before the timeout delay
if(state.canScroll){
if(state.canScroll && getOptions().fitToSection){
//allows to scroll to an active section and
//if the section is already active, we prevent firing callbacks
setState({isResizing: true});
Expand Down

0 comments on commit 386f92f

Please sign in to comment.