Skip to content

Commit

Permalink
fix: Stripped out keys with no data
Browse files Browse the repository at this point in the history
  • Loading branch information
lewislarsen committed Aug 27, 2024
1 parent 85b33ec commit a82b436
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/Livewire/Profile/AuditLogPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@ public function clearSelectedLog(): void
$this->dispatch('close-modal', 'audit-log-details');
}

// Assuming Toaster is properly imported

/**
* Export the filtered audit logs in the specified format.
*/
Expand Down Expand Up @@ -261,9 +259,11 @@ private function filterContext(array $context): array

$encryptedFields = $this->getEncryptedFields();

foreach (array_keys($filteredContext) as $field) {
foreach ($filteredContext as $field => $value) {
if (in_array($field, $encryptedFields, true)) {
$filteredContext[$field] = '[encrypted]';
} elseif ($value === null || $value === '') {
unset($filteredContext[$field]);
}
}

Expand Down

0 comments on commit a82b436

Please sign in to comment.