Commit 18294f0
authored
fix handleDeltaChanges with correct lastBuildTime type (#290)
### Description
The `lastBuildTime` variable was incorrectly typed as a `Date`, while it
is actually a `string` returned by the cache system.
This caused a silent runtime error: `toISOString is not a function`
which resulted in the delta check always failing and all documents being
re-synced.
This commit corrects the type and ensures proper handling of
`lastBuildTime`.
### Testing
1. Run `gatsby develop` twice.
2. On the second run, verify that only changed documents are synced with
Sanity.
Co-authored-by: David Saitta <>1 parent 6e3d478 commit 18294f0
1 file changed
+2
-2
lines changedLines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
0 commit comments