1
0
mirror of https://github.com/kremalicious/gatsby-plugin-matomo.git synced 2024-12-22 17:23:23 +01:00

always fire route updates in dev mode

This commit is contained in:
Matthias Kretschmann 2019-03-30 14:38:22 +01:00
parent 04b8ba1903
commit 7b7f4783a6
Signed by: m
GPG Key ID: 606EEEF3C479A91F

View File

@ -15,7 +15,7 @@ function getDuration() {
}
exports.onRouteUpdate = ({ location, prevLocation }) => {
if (process.env.NODE_ENV === 'production' && typeof _paq !== 'undefined') {
if (process.env.NODE_ENV === 'production' && typeof _paq !== 'undefined' || window.dev === true) {
window._paq = window._paq || []
window.dev = window.dev || null