diff --git a/index.js b/index.js index 3f8274f5..d344a15d 100644 --- a/index.js +++ b/index.js @@ -182,9 +182,6 @@ const createClient = (profile, userAgent, opt = {}) => { let earlierRef = null, laterRef = null const more = (when, journeysRef) => { const query = { - outDate: profile.formatDate(profile, when), - outTime: profile.formatTime(profile, when), - ctxScr: journeysRef, getPasslist: !!opt.stopovers, maxChg: opt.transfers, minChgTime: opt.transferTime, @@ -204,6 +201,11 @@ const createClient = (profile, userAgent, opt = {}) => { // todo: `getConGroups: false` what is this? // todo: what is getEco, fwrd? } + if (journeysRef) query.ctxScr = journeysRef + else { + query.outDate = profile.formatDate(profile, when) + query.outTime = profile.formatTime(profile, when) + } if (profile.journeysNumF && opt.results !== null) query.numF = opt.results if (profile.journeysOutFrwd) query.outFrwd = outFrwd