Skip to content

Commit

Permalink
use Object.assign instead of slice
Browse files Browse the repository at this point in the history
  • Loading branch information
jgreben committed May 15, 2019
1 parent b8bc909 commit 4a1c07f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/editor/ResourceTemplateForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export class ResourceTemplateForm extends Component {
resourceTemplatePromises = async (templateRefs) => {
return Promise.all(templateRefs.map(rtId =>
getResourceTemplate(rtId).catch(err => {
const joinedErrorUrls = this.state.templateErrors.slice(0)
const joinedErrorUrls = Object.assign({}, this.state.templateErrors)
joinedErrorUrls.push(decodeURIComponent(resourceToName(err.url)))
this.setState({templateErrors: _.sortedUniq(joinedErrorUrls)})
})
Expand Down

0 comments on commit 4a1c07f

Please sign in to comment.