Never pass mutable data to selectors
This commit is contained in:
@@ -357,7 +357,9 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
|
|||||||
const { storyChanged } = window.reduxActions.stories;
|
const { storyChanged } = window.reduxActions.stories;
|
||||||
|
|
||||||
if (isStory(this.attributes)) {
|
if (isStory(this.attributes)) {
|
||||||
const storyData = getStoryDataFromMessageAttributes(this.attributes);
|
const storyData = getStoryDataFromMessageAttributes({
|
||||||
|
...this.attributes,
|
||||||
|
});
|
||||||
|
|
||||||
if (!storyData) {
|
if (!storyData) {
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user