From 0fe32e1a36a2245c94db37fbd1cd99c45d88b946 Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Wed, 11 Sep 2019 12:36:41 +0100 Subject: [PATCH] cleanup --- src/index.js | 1 - src/page/channelCreator/view.js | 2 -- src/redux/reducers/form.js | 4 ---- src/utils/helper.js | 4 ++-- 4 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/index.js b/src/index.js index 24ae70e..9b92508 100644 --- a/src/index.js +++ b/src/index.js @@ -44,7 +44,6 @@ import thunk from 'redux-thunk'; const globalExceptionHandler = (error, isFatal) => { if (error && NativeModules.Firebase) { - console.log(error); NativeModules.Firebase.logException(isFatal, error.message ? error.message : 'No message', JSON.stringify(error)); } }; diff --git a/src/page/channelCreator/view.js b/src/page/channelCreator/view.js index c5de93d..900eba2 100644 --- a/src/page/channelCreator/view.js +++ b/src/page/channelCreator/view.js @@ -738,8 +738,6 @@ export default class ChannelCreator extends React.PureComponent { uploadingImage, } = this.state; - console.log(abandoningClaimIds); - return ( { const channelFormValues = Object.assign({}, state.channelFormValues); const newChannelFormValues = Object.assign(channelFormValues, data); - console.log(channelFormValues); - console.log('***newvalues***'); - console.log(newChannelFormValues); - return { ...state, channelFormValues: newChannelFormValues, diff --git a/src/utils/helper.js b/src/utils/helper.js index 7e1538c..c2c9597 100644 --- a/src/utils/helper.js +++ b/src/utils/helper.js @@ -299,8 +299,8 @@ export function uploadImageAsset(filePath, success, failure) { }; const fileName = filePath.substring(filePath.lastIndexOf('/') + 1); - let fileExt = fileName.indexOf('.') > -1 ? fileName.substring(fileName.lastIndexOf('.') + 1) : 0; - if (!fileExt || fileExt.trim().length === 0) { + let fileExt = fileName.indexOf('.') > -1 ? fileName.substring(fileName.lastIndexOf('.') + 1).trim() : 0; + if (!fileExt) { fileExt = 'jpg'; // default to jpg } const fileType = `image/${fileExt}`;