Fix withLinks decorator

This commit is contained in:
Filipp Riabchun 2019-05-19 15:09:37 +02:00 committed by GitHub
parent 5040a7c6d0
commit 66067cc965
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,7 +38,7 @@ export const hrefTo = (kind: string, name: string): Promise<string> =>
}); });
const linksListener = (e: SyntheticEvent<HTMLLinkElement>) => { const linksListener = (e: SyntheticEvent<HTMLLinkElement>) => {
const { sbKind: kind, sbStory: story } = e.currentTarget.dataset; const { sbKind: kind, sbStory: story } = e.target.dataset;
if (kind || story) { if (kind || story) {
e.preventDefault(); e.preventDefault();
navigate({ kind, story }); navigate({ kind, story });