Skip to content

Commit 356f008

Browse files
committed
Fix assets library upload first attachment
1 parent 2cc9ba2 commit 356f008

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/containers/ProjectAssets/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ const ProjectAssets = ({
191191
<PrimaryButton
192192
text='Back'
193193
type={'info'}
194-
link={`/projects/${projectId}/edit`}
194+
link={`/projects/${projectId}/challenges`}
195195
/>
196196
</div>
197197
</div>

src/reducers/projects.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ export default function (state = initialState, action) {
252252
...state,
253253
projectDetail: {
254254
...state.projectDetail,
255-
attachments: [...state.projectDetail.attachments, action.payload]
255+
attachments: [...(state.projectDetail.attachments || []), action.payload]
256256
}
257257
}
258258
case UPDATE_PROJECT_ATTACHMENT_SUCCESS:

0 commit comments

Comments
 (0)