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:
parent
204d335273
commit
a8f58be450
|
@ -12,7 +12,7 @@ export default class Link extends Component {
|
||||||
|
|
||||||
linkClicked (e) {
|
linkClicked (e) {
|
||||||
if (e.target.nodeName === 'A' &&
|
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
|
// ignore click for new tab / new window behavior
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue