Skip to content

Commit

Permalink
Flash message didn't appear when redirecting after setFlash.
Browse files Browse the repository at this point in the history
  • Loading branch information
ciscoheat committed Aug 9, 2023
1 parent 827dc67 commit c1b560a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ Headlines: Added, Changed, Deprecated, Removed, Fixed, Security
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.1.2] - 2023-08-09
## [2.1.3] - 2023-08-09

### Fixed

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

## [2.1.1] - 2023-08-08

Expand Down
2 changes: 1 addition & 1 deletion src/lib/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ function _initFlash(page: Readable<Page>, options?: FlashOptions): Writable<App.
store.set(undefined);
}

if (lastUpdate != 'page' && ['form', 'goto'].includes(nav.type as string)) {
if (nav.type == 'goto' || (lastUpdate != 'page' && nav.type == 'form')) {
updateFlash(page);
}
});
Expand Down

0 comments on commit c1b560a

Please sign in to comment.