Skip to content

Commit

Permalink
Merge pull request #2 from pubpub/reactive-copies-with-content
Browse files Browse the repository at this point in the history
fix: getReactedCopy() result will have content if argument has content
  • Loading branch information
idreyn authored Nov 16, 2020
2 parents bc757ff + bebecd8 commit efd5ab6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/store/documentStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,11 @@ export class DocumentStore {
if (node.attrs) {
const { [this.idAttrKey]: nodeId } = node.attrs;
if (this.nodeStores[nodeId]) {
return this.availableNodes[nodeId];
const reactedCopy = this.availableNodes[nodeId];
if (node.content) {
return reactedCopy.copy(node.content);
}
return reactedCopy;
}
}
return null;
Expand Down

0 comments on commit efd5ab6

Please # to comment.