Prevent crash when switching to Date type in Datetime interface (#23384)

Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
This commit is contained in:
SP12893678
2024-08-19 00:37:58 +08:00
committed by GitHub
parent feba625959
commit 9b572e8bd8
2 changed files with 5 additions and 4 deletions

View File

@@ -0,0 +1,5 @@
---
'@directus/app': patch
---
Prevented a crash in the Data Studio when switching to the "Date" type while configuring Datetime interface

View File

@@ -12,10 +12,6 @@ export default defineInterface({
group: 'selection',
options: ({ field }) => {
if (field.type === 'date') {
if (field.meta?.options) {
field.meta.options = {};
}
return [];
}