always enable marks in development

This commit is contained in:
Nolan Lawson 2018-01-31 08:40:37 -08:00
parent 2c2f84b870
commit eebadf8a71

View file

@ -1,8 +1,9 @@
import { mark as markyMark, stop as markyStop } from 'marky' import { mark as markyMark, stop as markyStop } from 'marky'
import noop from 'lodash/noop' import noop from 'lodash/noop'
const enableMarks = typeof window !== 'undefined' && const enableMarks = process.browser &&
new URLSearchParams(location.search).get('marks') === 'true' (process.env.NODE_ENV !== 'production' ||
new URLSearchParams(location.search).get('marks') === 'true')
const mark = enableMarks ? markyMark : noop const mark = enableMarks ? markyMark : noop
const stop = enableMarks ? markyStop : noop const stop = enableMarks ? markyStop : noop