fix validation if null, empty or undefined

This commit is contained in:
ayntk-ai 2024-08-18 21:00:30 +02:00
parent abd2aefd6c
commit c813373d21
No known key found for this signature in database
2 changed files with 12 additions and 3 deletions

View File

@ -159,9 +159,14 @@
</div>
@endif
<script>
function gotoProject(uuid, environment) {
window.location.href = '/project/' + uuid + '/' + environment;
if (environment) {
window.location.href = '/project/' + uuid + '/' + environment;
} else {
window.location.href = '/project/' + uuid;
}
}
</script>
{{-- <x-forms.button wire:click='getIptables'>Get IPTABLES</x-forms.button> --}}

View File

@ -32,8 +32,12 @@
</div>
<script>
function gotoProject(uuid, defaultEnvironment) {
window.location.href = '/project/' + uuid + '/' + defaultEnvironment;
function gotoProject(uuid, environment) {
if (environment) {
window.location.href = '/project/' + uuid + '/' + environment;
} else {
window.location.href = '/project/' + uuid;
}
}
</script>
</div>