Merge pull request #787 from lbryio/master

Cut staging from master
This commit is contained in:
Shawn K 2018-11-30 01:54:43 -06:00 committed by GitHub
commit 62cf5aefed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -11,11 +11,10 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faEdit } from '@fortawesome/free-solid-svg-icons';
const isFacebook = (() => {
if(typeof window === 'undefined') {
if(typeof window === 'undefined' || typeof window.navigator.userAgent === 'undefined') {
return false;
}
const ua = window.navigator.userAgent || window.navigator.vendor || window.window.opera;
return ua.indexOf('FBAN') !== -1 || ua.indexOf('FBAV') !== -1;
return window.navigator.userAgent.indexOf('FBAN') !== -1 || window.navigator.userAgent.indexOf('FBAV') !== -1;
})();
class Dropzone extends React.Component {
@ -205,7 +204,7 @@ class Dropzone extends React.Component {
type='file'
id='file_input'
name='file_input'
{...(isFacebook ? {} : { accept: 'video/*,image/*' })}
{...(isFacebook ? { accept: 'image/*' } : { accept: 'video/*,image/*' })}
onChange={this.handleFileInput}
encType='multipart/form-data'
/>