Skip to content

Commit

Permalink
Added $.os.wp to tests, and fixed ie conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
haas85 committed May 6, 2014
1 parent b5a32cf commit 4eb9942
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/detect.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
if (!silk && os.android && ua.match(/Kindle Fire/)) browser.silk = true
if (chrome) browser.chrome = true, browser.version = chrome[1]
if (firefox) browser.firefox = true, browser.version = firefox[1]
if (ie && !wp) browser.ie = true, browser.version = ie[1]
if (ie) browser.ie = true, browser.version = ie[1]
if (safari && (osx || os.ios)) {browser.safari = true; if (osx) browser.version = safari[1]}
if (webview) browser.webview = true

Expand Down
1 change: 1 addition & 0 deletions test/detect.html
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,7 @@ <h1>Zepto Detect unit tests</h1>
})

detect(UA.Windows_Phone_8, function(os, browser){
t.assertTrue(os.wp)
t.assertTrue(os.phone)
t.assertFalse(os.tablet)
t.assertTrue(browser.ie)
Expand Down

0 comments on commit 4eb9942

Please sign in to comment.