Commit 7425042
fix: getConfigValue falls back when field is undefined/null
When a Sanity singleton exists but a field hasn't been set yet,
config[key] returns undefined. Previously the fallback only applied
when getConfig() threw (doc missing entirely). Now fallback is used
whenever the value is undefined or null.
Fixes RangeError: Invalid time value in ingest cron when
dedupWindowDays is unset in Sanity.
Co-authored-by: pm <pm@miriad.systems>1 parent 9dc65ca commit 7425042
1 file changed
+6
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
98 | 103 | | |
99 | 104 | | |
100 | 105 | | |
| |||
0 commit comments