Skip to content
This repository was archived by the owner on Jul 28, 2025. It is now read-only.

Commit 9304567

Browse files
authored
fix: don't check for status ==="response" to derive state (#409)
1 parent 34c60d6 commit 9304567

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.changeset/smooth-plants-deliver.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"frog": patch
3+
---
4+
5+
Fixed an issue where `c.deriveState` would not modify state in initial frame handler.

src/utils/getFrameContext.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ export function getFrameContext<
6363
function deriveState(
6464
derive?: (state: _state) => void | Promise<void>,
6565
): _state | Promise<_state> {
66-
if (status !== 'response') return previousState as _state
6766
if (!derive) return previousState as _state
6867

6968
const clone = structuredClone(previousState)

0 commit comments

Comments
 (0)