1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-22 09:23:13 +01:00

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') * @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`. // validate `when`, must be contained in `WHEN_ENUM`.
// Throw an error otherwise. // Throw an error otherwise.
if (WHEN_ENUM.indexOf(when) === -1) { if (WHEN_ENUM.indexOf(when) === -1) {
@ -80,8 +80,8 @@ export function ProxyHandler(...redirectFunctions) {
displayName: 'ProxyHandler', displayName: 'ProxyHandler',
propTypes: { propTypes: {
// Provided from AscribeApp // Provided from AscribeApp, after the routes have been initialized
currentUser: React.PropTypes.object.isRequired, currentUser: React.PropTypes.object,
whitelabel: React.PropTypes.object, whitelabel: React.PropTypes.object,
// Provided from router // Provided from router

View File

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

View File

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