mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Account for revisions data/delta to be null (#21596)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
export type Revision = {
|
||||
id: number;
|
||||
data: Record<string, any>;
|
||||
delta: Record<string, any>;
|
||||
data: Record<string, any> | null;
|
||||
delta: Record<string, any> | null;
|
||||
collection: string;
|
||||
item: string | number;
|
||||
activity: {
|
||||
|
||||
@@ -16,9 +16,7 @@ defineEmits<{
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const revisionCount = computed(() => {
|
||||
return Object.keys(props.revision.delta).length;
|
||||
});
|
||||
const revisionCount = computed(() => (props.revision.delta ? Object.keys(props.revision.delta).length : 0));
|
||||
|
||||
const headerMessage = computed(() => {
|
||||
switch (props.revision.activity.action.toLowerCase()) {
|
||||
|
||||
Reference in New Issue
Block a user