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 02:44:46 +08:00
parent 86288079f1
commit 76599190f6
@@ -126,7 +126,9 @@ export default {
successHandler(response) { successHandler(response) {
if(window.LARAVEL_VAPOR_ENABLED){ if(window.LARAVEL_VAPOR_ENABLED){
if (response.src) { if (response.src) {
window.location.href = response.src; // window.location.href = response.src;
console.log('download');
window.open(response.src, '_blank');
} }
} }
}, },