Skip to content

Commit

Permalink
Add "window" to access to the 'navigator' property (#803)
Browse files Browse the repository at this point in the history
* Add "window" to access to the 'navigator' property

I don't kow the reason why but in my case I'm getting an error "navigator is not defined".
Adding "window" in front of it, resolves my problem.
As adding or not "window" should not affect the code, I assume that putting it should not be an issue for anyone but it will be appreciated by me ;)

* update min and ui.min files
  • Loading branch information
bsvobodny authored and Rycochet committed Jan 6, 2018
1 parent 0059eea commit 319ddeb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions velocity.js
Original file line number Diff line number Diff line change
Expand Up @@ -702,12 +702,12 @@
/* Container for page-wide Velocity state data. */
State: {
/* Detect mobile devices to determine if mobileHA should be turned on. */
isMobile: /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),
isMobile: /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(window.navigator.userAgent),
/* The mobileHA option's behavior changes on older Android devices (Gingerbread, versions 2.3.3-2.3.7). */
isAndroid: /Android/i.test(navigator.userAgent),
isGingerbread: /Android 2\.3\.[3-7]/i.test(navigator.userAgent),
isAndroid: /Android/i.test(window.navigator.userAgent),
isGingerbread: /Android 2\.3\.[3-7]/i.test(window.navigator.userAgent),
isChrome: window.chrome,
isFirefox: /Firefox/i.test(navigator.userAgent),
isFirefox: /Firefox/i.test(window.navigator.userAgent),
/* Create a cached element for re-use when checking for CSS property prefixes. */
prefixElement: document.createElement("div"),
/* Cache every prefix match to avoid repeating lookups. */
Expand Down
Loading

0 comments on commit 319ddeb

Please sign in to comment.