From eebadf8a71b16d24e2e488911988a96e1f52d25e Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Wed, 31 Jan 2018 08:40:37 -0800 Subject: [PATCH] always enable marks in development --- routes/_utils/marks.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/routes/_utils/marks.js b/routes/_utils/marks.js index 14c6363d..88247510 100644 --- a/routes/_utils/marks.js +++ b/routes/_utils/marks.js @@ -1,8 +1,9 @@ import { mark as markyMark, stop as markyStop } from 'marky' import noop from 'lodash/noop' -const enableMarks = typeof window !== 'undefined' && - new URLSearchParams(location.search).get('marks') === 'true' +const enableMarks = process.browser && + (process.env.NODE_ENV !== 'production' || + new URLSearchParams(location.search).get('marks') === 'true') const mark = enableMarks ? markyMark : noop const stop = enableMarks ? markyStop : noop