Merged in fix/SW-2375-aa-tracking-critical-pageview- (pull request #1863)
fix: SW-2375 Fixed object comparison in bookingflow params flag * fix: SW-2375 Fixed object comparison in bookingflow params flag Approved-by: Niclas Edenvin
This commit is contained in:
@@ -22,7 +22,7 @@ interface TrackingStoreState {
|
||||
params: ReadonlyURLSearchParams
|
||||
) => void
|
||||
hasPathOrLangChanged: () => boolean
|
||||
hasBookingFlowParamsChange: () => boolean
|
||||
hasBookingFlowParamsChanged: () => boolean
|
||||
}
|
||||
|
||||
const useTrackingStore = create<TrackingStoreState>((set, get) => ({
|
||||
@@ -69,7 +69,7 @@ const useTrackingStore = create<TrackingStoreState>((set, get) => ({
|
||||
|
||||
return currentPath !== previousPath || currentLang !== previousLang
|
||||
},
|
||||
hasBookingFlowParamsChange: () => {
|
||||
hasBookingFlowParamsChanged: () => {
|
||||
const { currentPath, currentParams, previousParams } = get()
|
||||
|
||||
if (!previousParams || !currentParams) return false
|
||||
@@ -84,7 +84,7 @@ const useTrackingStore = create<TrackingStoreState>((set, get) => ({
|
||||
searchParamsToRecord(currentParams)
|
||||
)
|
||||
|
||||
return Object.is(previousParamsObject, currentParamsObject)
|
||||
return !Object.is(previousParamsObject, currentParamsObject)
|
||||
},
|
||||
}))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user