marknotton / craft-plugin-agent

Query the server-side information from the users agent data.
MIT License
7 stars 4 forks source link

When user agent is blank, the check method returns "true" #6

Closed richardfrankza closed 4 years ago

richardfrankza commented 4 years ago

When we use

{{craft.agent.check('ie <= 11')}}

And the user agent is not supplied, e.g.

curl --user-agent "" https://example.com/

it will return true when it is supposed to return false.

However, using a magic method like isIE() works

Please let me know if you need further detail.

marknotton commented 4 years ago

Thanks for reporting this. I'll check it out.