Skip to content

Commit c1b560a

Browse files
committed
Flash message didn't appear when redirecting after setFlash.
1 parent 827dc67 commit c1b560a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@ Headlines: Added, Changed, Deprecated, Removed, Fixed, Security
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [2.1.2] - 2023-08-09
8+
## [2.1.3] - 2023-08-09
99

1010
### Fixed
1111

1212
- `afterNavigate` fix when automatically clearing the flash message.
13+
- Flash message didn't appear when redirecting after `setFlash`.
1314

1415
## [2.1.1] - 2023-08-08
1516

src/lib/client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ function _initFlash(page: Readable<Page>, options?: FlashOptions): Writable<App.
9797
store.set(undefined);
9898
}
9999

100-
if (lastUpdate != 'page' && ['form', 'goto'].includes(nav.type as string)) {
100+
if (nav.type == 'goto' || (lastUpdate != 'page' && nav.type == 'form')) {
101101
updateFlash(page);
102102
}
103103
});

0 commit comments

Comments
 (0)