fix: switch to @iarna/toml as toml parser, handle raw dates in datetime field (#715)
This commit is contained in:
committed by
GitHub
parent
804c09415b
commit
95e64792dd
@ -66,7 +66,7 @@ export default function useWidgetsFor(
|
||||
|
||||
if (field.widget === 'list' || Array.isArray(value)) {
|
||||
let finalValue: ObjectValue[];
|
||||
if (!value || typeof value !== 'object') {
|
||||
if (!value || typeof value !== 'object' || value instanceof Date) {
|
||||
finalValue = [];
|
||||
} else if (!Array.isArray(value)) {
|
||||
finalValue = [value];
|
||||
@ -100,7 +100,7 @@ export default function useWidgetsFor(
|
||||
});
|
||||
}
|
||||
|
||||
if (typeof value !== 'object') {
|
||||
if (typeof value !== 'object' || value instanceof Date) {
|
||||
return {
|
||||
data: {},
|
||||
widgets: {},
|
||||
|
Reference in New Issue
Block a user