Skip to content

Commit

Permalink
Merge pull request #19 from cofinley/bugfix/6-unlinked-references-all…
Browse files Browse the repository at this point in the history
…-expand

#6 Prevent Toggling All Unlinked Refs on Click
  • Loading branch information
cofinley committed Feb 14, 2021
2 parents 2d4ca07 + 00f0e41 commit b824d30
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/features/editor/Editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const Editor = ({ blockId, isRoot, isMain, stopRecursion = false }) => {
</div>
}
{isRoot &&
<References block={block} isMain={isMain} />
<References block={block} isMain={isMain} key={block.id} />
}
</div>
)
Expand Down
2 changes: 1 addition & 1 deletion src/features/editor/References.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const References = ({ block, isMain }) => {
const [showUnlinkedRefs, setShowUnlinkedRefs] = useState(false)
const links = useSelector(state => state.links)
const blocks = useSelector(state => state.blocks)
const references = links[block.id]
const references = links.to[block.id]

const linkedReferences = () => {
if (block.parentId || !references || !references.length) {
Expand Down

0 comments on commit b824d30

Please sign in to comment.