Skip to content
Snippets Groups Projects
Commit 42cf12e3 authored by Ray Schamp's avatar Ray Schamp
Browse files

Handle null responses from storage

parent 009876d3
No related branches found
No related tags found
No related merge requests found
......@@ -27,7 +27,9 @@ const ProjectLoaderHOC = function (WrappedComponent) {
if (this.state.projectId !== prevState.projectId) {
storage
.load(storage.AssetType.Project, this.state.projectId, storage.DataFormat.JSON)
.then(projectAsset => this.setState({projectData: JSON.stringify(projectAsset.data)}))
.then(projectAsset => projectAsset && this.setState({
projectData: JSON.stringify(projectAsset.data)
}))
.catch(err => log.error(err));
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment