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
2 changed files with 12 additions and 3 deletions

View File

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

View File

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