mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 23:29:35 +02:00
Less optimistic variable handling
This commit is contained in:
parent
53c20ab0e8
commit
c908705167
1 changed files with 1 additions and 1 deletions
|
@ -37,7 +37,7 @@ import {formatTravellers} from '../format/travellers.js';
|
||||||
import {formatLoyaltyCard} from '../format/loyalty-cards.js';
|
import {formatLoyaltyCard} from '../format/loyalty-cards.js';
|
||||||
import {formatTransfers} from '../format/transfers.js';
|
import {formatTransfers} from '../format/transfers.js';
|
||||||
|
|
||||||
const DEBUG = (/(^|,)hafas-client(,|$)/).test(process?.env?.DEBUG ?? '');
|
const DEBUG = (/(^|,)hafas-client(,|$)/).test((typeof process !== 'undefined') ? (process.env.DEBUG || '') : '');
|
||||||
const logRequest = DEBUG
|
const logRequest = DEBUG
|
||||||
? (_, req, reqId) => console.error(String(req.body))
|
? (_, req, reqId) => console.error(String(req.body))
|
||||||
: () => { };
|
: () => { };
|
||||||
|
|
Loading…
Add table
Reference in a new issue