<commit_before>import {createAction} from 'redux-actions'
import {NAVIGATE} from './constants'

const history = typeof window !== 'undefined' && window.history

export const navigate = createAction(NAVIGATE, payload => {
  if (history && payload.source !== 'popState') {
    if (payload.push) {
      history.pushState({}, null, payload.url)
    } else if (payload.replace) {
      history.replaceState({}, null, payload.url)
    }
  }
  return payload
})<commit_msg>Put the actions back the way they were<commit_after>/* global history */
import {createAction} from 'redux-actions'
import {NAVIGATE} from './constants'

export const navigate = createAction(NAVIGATE, payload => {
  if (typeof history !== 'undefined' && payload.source !== 'popState') {
    if (payload.push) {
      history.pushState({}, null, payload.url)
    } else if (payload.replace) {
      history.replaceState({}, null, payload.url)
    }
  }
  return payload
})
{'fraction_non_alphanumeric': 0.14712153518123666, 'fraction_numerical': 0.0, 'mean_word_length': 3.890625, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6223312', 'n_tokens_mistral': 281, 'n_tokens_neox': 282, 'n_words': 78}