Skip to content

Commit

Permalink
docs: reword afterNavigate description so that it includes navigation…
Browse files Browse the repository at this point in the history
…s to the same URL (#13242)

similar to #13133
  • Loading branch information
eltigerchino authored Jan 6, 2025
1 parent e468be7 commit 059bff8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/kit/src/runtime/client/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -1724,7 +1724,7 @@ function add_navigation_callback(callbacks, callback) {
}

/**
* A lifecycle function that runs the supplied `callback` when the current component mounts, and also whenever we navigate to a new URL.
* A lifecycle function that runs the supplied `callback` when the current component mounts, and also whenever we navigate to a URL.
*
* `afterNavigate` must be called during a component initialization. It remains active as long as the component is mounted.
* @param {(navigation: import('@sveltejs/kit').AfterNavigate) => void} callback
Expand Down
2 changes: 1 addition & 1 deletion packages/kit/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2123,7 +2123,7 @@ declare module '$app/forms' {

declare module '$app/navigation' {
/**
* A lifecycle function that runs the supplied `callback` when the current component mounts, and also whenever we navigate to a new URL.
* A lifecycle function that runs the supplied `callback` when the current component mounts, and also whenever we navigate to a URL.
*
* `afterNavigate` must be called during a component initialization. It remains active as long as the component is mounted.
* */
Expand Down

0 comments on commit 059bff8

Please sign in to comment.