Skip to content

fix: Normalize reserved pdModal snippets on snippet cache restore - #58

Merged
zipper merged 1 commit into
masterfrom
fix/modal-restore-reserved-snippets
Oct 30, 2026
Merged

zipper merged 1 commit into
masterfrom
fix/modal-restore-reserved-snippets

Conversation

@zipper

@zipper zipper commented Oct 30, 2026

Copy link
Copy Markdown
Contributor
  • AjaxModalExtension now fills missing reserved modal snippets with empty strings also on the snippet cache restore event, not only on payload.
  • After a page refresh, Naja replaces the history state with a snapshot of the full page, where the modal skeleton is not present yet, so the restored state lacked the reserved snippets.
  • options.pdModal is available on restore, because onSnippetFetch sets it on the same options object before Naja dispatches restore.

…AjaxModalExtension`

After a page refresh, Naja replaces the history state with a snapshot of the
full page, where the modal skeleton is not present, so the reserved modal
snippets are missing from the stored snippets. Missing reserved snippets are
now filled with empty strings on `restore` the same way as in the payload.
@zipper
zipper merged commit e3750ee into master Oct 30, 2026
1 check passed
@zipper
zipper deleted the fix/modal-restore-reserved-snippets branch October 30, 2026 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant