If page uses the History API and stores data within the state object, it is lost when using the Flickity hash package as it provides null as the first option in the history.replaceState method, potentially breaking functionality which relies on data in the state object.
The history.replaceState call should read the current browser state using history.state, which returns the current object, or null if not yet modified through history methods.
If page uses the History API and stores data within the state object, it is lost when using the Flickity hash package as it provides
null
as the first option in thehistory.replaceState
method, potentially breaking functionality which relies on data in the state object.The
history.replaceState
call should read the current browser state usinghistory.state
, which returns the current object, ornull
if not yet modified through history methods.