Small fixes for warnings

This commit is contained in:
Brett Sun 2016-02-08 10:41:36 +01:00
parent 91f9e83e81
commit 537d6d52e8
3 changed files with 6 additions and 4 deletions

View File

@ -17,7 +17,7 @@ const WHEN_ENUM = ['loggedIn', 'loggedOut'];
*
* @param {enum/string} options.when ('loggedIn' || 'loggedOut')
*/
export function AuthRedirect({to, when}) {
export function AuthRedirect({ to, when }) {
// validate `when`, must be contained in `WHEN_ENUM`.
// Throw an error otherwise.
if (WHEN_ENUM.indexOf(when) === -1) {
@ -80,8 +80,8 @@ export function ProxyHandler(...redirectFunctions) {
displayName: 'ProxyHandler',
propTypes: {
// Provided from AscribeApp
currentUser: React.PropTypes.object.isRequired,
// Provided from AscribeApp, after the routes have been initialized
currentUser: React.PropTypes.object,
whitelabel: React.PropTypes.object,
// Provided from router

View File

@ -84,6 +84,7 @@ let FileDragAndDropDialog = React.createClass({
dialogElement = [
this.getDragDialog(fileClassToUpload.plural),
(<span
key='mutlipleFilesBtn'
className="btn btn-default"
onClick={onClick}>
{getLangText('choose %s to upload', fileClassToUpload.plural)}
@ -96,6 +97,7 @@ let FileDragAndDropDialog = React.createClass({
dialogElement = [
this.getDragDialog(fileClassToUpload.singular),
(<span
key='singleFileBtn'
className="btn btn-default"
onClick={onClick}>
{dialog}

View File

@ -487,7 +487,7 @@ const ReactS3FineUploader = React.createClass({
return (enableLocalHashing && !uploadMethod) ||
!areAssetsEditable ||
(showErrorPrompt && errorState.errorClass) ||
(!multiple && filesToDisplay.length);
(!multiple && filesToDisplay.length > 0);
},
isFileValid(file) {