Skip to content

Commit

Permalink
Merge a42e7ab into 0406924
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergeykot committed Nov 14, 2016
2 parents 0406924 + a42e7ab commit 854a66e
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions app/assets/javascripts/components/stores/ElementStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,9 @@ class ElementStore {
// -- Screens --

handleFetchScreenById(result) {
this.state.currentElement = result;
if (!this.state.currentElement || this.state.currentElement._checksum != result._checksum) {
this.state.currentElement = result;
}
}

handleFetchScreensByCollectionId(result) {
Expand Down Expand Up @@ -397,9 +399,11 @@ class ElementStore {
// -- Reactions --

handleFetchReactionById(result) {
this.state.currentElement = result;
this.state.elements.reactions.elements = this.refreshReactionsListForSpecificReaction(result);
this.navigateToNewElement(result);
if (!this.state.currentElement || this.state.currentElement._checksum != result._checksum) {
this.state.currentElement = result;
this.state.elements.reactions.elements = this.refreshReactionsListForSpecificReaction(result);
this.navigateToNewElement(result);
}
}

refreshReactionsListForSpecificReaction(newReaction) {
Expand Down

0 comments on commit 854a66e

Please sign in to comment.