Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

fix: cannot save post when the publishTime is blank #763

Merged
merged 1 commit into from
Dec 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ const publishTime = computed(() => {
});
const onPublishTimeChange = (value: string) => {
formState.value.spec.publishTime = toISOString(value);
formState.value.spec.publishTime = value ? toISOString(value) : undefined;
};
</script>

Expand Down
2 changes: 1 addition & 1 deletion src/modules/contents/posts/components/PostSettingModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ const publishTime = computed(() => {
});
const onPublishTimeChange = (value: string) => {
formState.value.spec.publishTime = toISOString(value);
formState.value.spec.publishTime = value ? toISOString(value) : undefined;
};
</script>
<template>
Expand Down