Skip to content

Commit

Permalink
fix: isMobileFacebook
Browse files Browse the repository at this point in the history
  • Loading branch information
Jack-Works committed Aug 5, 2019
1 parent 928f871 commit adb848f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/social-network-provider/facebook.com/isMobile.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// import { OnlyRunInContext } from '@holoflows/kit/es'
import { OnlyRunInContext } from '@holoflows/kit/es'

// OnlyRunInContext('content', 'isMobile')
export const isMobileFacebook = location.hostname === 'm.facebook.com'
export const isMobileFacebook = OnlyRunInContext('content', false)
? location.hostname === 'm.facebook.com'
: navigator.userAgent.match(/Mobile|mobile/)

0 comments on commit adb848f

Please sign in to comment.