Skip to content
This repository has been archived by the owner on Sep 11, 2020. It is now read-only.

Commit

Permalink
fix: vérifie que Matomo site_id est un nombre
Browse files Browse the repository at this point in the history
  • Loading branch information
francoisromain committed Apr 20, 2020
1 parent 3fdc773 commit d306254
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/stats/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
const MatomoTracker = require('matomo-tracker')

module.exports =
process.env.MATOMO_SITE_ID && process.env.MATOMO_HOST
process.env.MATOMO_SITE_ID &&
Number(process.env.MATOMO_SITE_ID) &&
process.env.MATOMO_HOST
? new MatomoTracker(
Number(process.env.MATOMO_SITE_ID),
`${process.env.MATOMO_HOST}/matomo.php`,
Expand Down

0 comments on commit d306254

Please sign in to comment.