Skip to content

Commit

Permalink
Delete prop after usage
Browse files Browse the repository at this point in the history
Signed-off-by: sitbubu <royi.sitbon@logz.io>
  • Loading branch information
RoyiSitbon committed Feb 22, 2022
1 parent fec8a85 commit 6b62b70
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ export function DocViewerLinks(renderProps: DocViewLinkRenderProps) {
const listItems = getDocViewsLinksRegistry()
.getDocViewsLinksSorted()
.map((item) => {
item.href = item.generateurlcb ? item.generateurlcb(renderProps) : item.href;
if (item.generateurlcb) {
item.href = item.generateurlcb(renderProps);
delete item.generateurlcb;
}

return item;
});

Expand Down

0 comments on commit 6b62b70

Please sign in to comment.