fix(tracker): restore link navigation when tracking fails
Use .finally() instead of .then() so internal link navigation is always restored after e.preventDefault(), even if the tracking request rejects (e.g. server down or a throwing beforeSend callback). Fixes #4304
This commit is contained in:
1 parent
10f6ee27da
commit
18b72d3008
1 file changed
+1
-1
@@ -138,7 +138,7 @@
|
||||
e.metaKey ||
|
||||
(e.button && e.button === 1);
|
||||
if (!external) e.preventDefault();
|
||||
return trackElement(eventEl).then(() => {
|
||||
return trackElement(eventEl).finally(() => {
|
||||
if (!external) {
|
||||
(target === '_top' ? top.location : location).href = href;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user