Skip to content
This repository was archived by the owner on Mar 27, 2018. It is now read-only.

Commit 22bbb12

Browse files
author
Ian Wensink
committed
fix(async-mapper): fix asyncMapper for entities
Fix problem where having an asyncMapper for entities on two pages with the same entity would cause the mapped component for the first page to be used on the second page as well, without checking the bundle.
1 parent c4a2f48 commit 22bbb12

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/EntityMapper.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ class EntityMapper extends Component {
8787
const state = getNested(() => this.context.hnContext.state.entities[uuid]);
8888
if (state) {
8989
this.setState(state);
90+
delete this.context.hnContext.state.entities[uuid];
9091
} else {
9192
this.loadComponent(this.props);
9293
}

0 commit comments

Comments
 (0)