Closed joeybaker closed 10 years ago
I'm having a hard time reproducing this one, as I haven't been able to get useragent to return undefined
instead of an agent object. Is this still an issue for you? Can you log request.raw.req.headers
for me so I can see what's actually causing the failure?
@nlf heh… this was long enough ago, that I don't remember all the details. I believe I was dealing with redirects at the time. Sorry for the lack of detail… either way, as you probably already decided, this is a harmless enough change, no?
The problem is I'm unable to write a test to cover it, so not only does code coverage fall below 100% but I also have no way to test for regressions.
hmmm… yes, totally fair. I'll think about a test. It should be possible if you mock useragent, no?
I've got hapi doing some redirects and (apparently) that can cause the userAgent string to be empty. In that case, scooter returns
undefined
. This prevents blankie from crashing in that case.