Only use db functions when components are actually mounted

This commit is contained in:
Julia Friesel
2018-09-11 18:06:19 +02:00
parent 04e43b823d
commit 3e3cef8769
6 changed files with 25 additions and 20 deletions
+2 -2
View File
@@ -13,8 +13,8 @@ export default function config(opts) {
if (!opts) {
// we only want to require (and run) the db module
// when not running the tests
bleedingDaysSortedByDate = require('../db').bleedingDaysSortedByDate
cycleDaysSortedByDate = require('../db').cycleDaysSortedByDate
bleedingDaysSortedByDate = require('../db').getBleedingDaysSortedByDate()
cycleDaysSortedByDate = require('../db').getCycleDaysSortedByDate()
maxBreakInBleeding = 1
maxCycleLength = 99
minCyclesForPrediction = 3