Handling undefined values in fetchAssets call.

This commit is contained in:
David Jay
2016-12-21 11:39:21 -08:00
parent 149a0487c6
commit 29fa26260c
+1 -1
View File
@@ -16,7 +16,7 @@ import coralApi from '../../../coral-framework/helpers/response';
// Get comments to fill each of the three lists on the mod queue
export const fetchAssets = (skip, limit, sort, search, filter) => (dispatch) => {
dispatch({type: FETCH_ASSETS});
return coralApi(`/assets?skip=${skip}&limit=${limit}&sort=${sort}&search=${search}&filter=${filter}`)
return coralApi(`/assets?skip=${skip || ''}&limit=${limit || ''}&sort=${sort || ''}&search=${search || ''}&filter=${filter || ''}`)
.then(({result, count}) =>
dispatch({type: FETCH_ASSETS_SUCCESS,
assets: result,