Laravel Vapor - Fix inconsistency of download triggers which suppose to open in a new tab instead of current

This commit is contained in:
Dillon Ngo
2024-10-24 03:38:53 +08:00
parent be7387a16f
commit efed8b639d
4 changed files with 1 additions and 4 deletions
@@ -42,7 +42,6 @@
if(window.LARAVEL_VAPOR_ENABLED){
if (response.src) {
// window.location.href = response.src;
console.log('download');
window.open(response.src, '_blank');
}
}
@@ -131,7 +131,6 @@ export default {
if(!success){return;}
if (response.src) {
// window.location.href = response.src;
console.log('download');
window.open(response.src, '_blank');
}
});
@@ -82,7 +82,6 @@
if(!success){return;}
if (response.src) {
// window.location.href = response.src;
console.log('download');
window.open(response.src, '_blank');
}
});
@@ -159,7 +159,7 @@
response.json().then(response => {
if(!success){return;}
if (response.src) {
window.location.href = response.src;
window.open(response.src, '_blank');
}
});
}