TypeError: Cannot read property 'replace' of undefined
   at Object.exports.trim_slashes (/home/adp/adpv5/js/utils.js:352:13)
   at Object.exports.generate_pdf (/home/adp/adpv5/js/statsnapshot.js:197:21)
   at Object.exports.STATISTICALSNAPSHOT_pdf (/home/adp/adpv5/js/navigation.js:8:16)
   at async.series (/home/adp/adpv5/index.js:181:16)
   at /home/adp/adpv5/node_modules/async/dist/async.js:3883:24
   at replenish (/home/adp/adpv5/node_modules/async/dist/async.js:1014:17)
   at /home/adp/adpv5/node_modules/async/dist/async.js:1019:9
   at eachOfLimit (/home/adp/adpv5/node_modules/async/dist/async.js:1044:24)
   at /home/adp/adpv5/node_modules/async/dist/async.js:1049:16
   at _parallel (/home/adp/adpv5/node_modules/async/dist/async.js:3882:5)