fix: switch to @iarna/toml as toml parser, handle raw dates in datetime field (#715)

This commit is contained in:
Daniel Lautzenheiser
2023-04-19 14:27:46 -04:00
committed by GitHub
parent 804c09415b
commit 95e64792dd
18 changed files with 39 additions and 3483 deletions

View File

@ -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: {},