1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

fix link for environments without synthetic events (like preact/the browser) (#393)

This commit is contained in:
Matthew Mueller 2016-12-14 22:33:02 -06:00 committed by Arunoda Susiripala
parent 204d335273
commit a8f58be450

View file

@ -12,7 +12,7 @@ export default class Link extends Component {
linkClicked (e) {
if (e.target.nodeName === 'A' &&
(e.metaKey || e.ctrlKey || e.shiftKey || e.nativeEvent.which === 2)) {
(e.metaKey || e.ctrlKey || e.shiftKey || (e.nativeEvent && e.nativeEvent.which === 2))) {
// ignore click for new tab / new window behavior
return
}