Correct doNotTrack property name

It has to be lower camel case for it to work in browsers, and it’s the way its defined in the spec.
This commit is contained in:
Daniel Aleksandersen 2018-04-25 13:21:08 +02:00 committed by GitHub
parent 32f4299656
commit 028f8f9307
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -34,7 +34,7 @@ function trackPageview() {
}
// Respect "Do Not Track" requests
if(navigator.DoNotTrack === "1") {
if('doNotTrack' in navigator && navigator.doNotTrack === "1") {
return;
}