Skip to content

Commit

Permalink
chore: fix some comments
Browse files Browse the repository at this point in the history
Signed-off-by: pwdcd <[email protected]>
  • Loading branch information
pwdcd committed Aug 15, 2024
1 parent 4b1f73f commit 299cd6d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/routers/create-browser-router.md
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ const router = createBrowserRouter(
);
```

**Patching sub-trees asyncronously**
**Patching sub-trees asynchronously**

You can also perform asynchronous matching to lazily fetch entire sections of your application:

Expand Down
4 changes: 2 additions & 2 deletions packages/router/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ export interface Router {

/**
* State maintained internally by the router. During a navigation, all states
* reflect the the "old" ___location unless otherwise noted.
* reflect the "old" ___location unless otherwise noted.
*/
export interface RouterState {
/**
Expand Down Expand Up @@ -1761,7 +1761,7 @@ export function createRouter(init: RouterInit): Router {
if (opts && opts.replace != null) {
replace = opts.replace;
} else {
// If the user didn't explicity indicate replace behavior, replace if
// If the user didn't explicitly indicate replace behavior, replace if
// we redirected to the exact same ___location we're currently at to avoid
// double back-buttons
let ___location = normalizeRedirectLocation(
Expand Down
4 changes: 2 additions & 2 deletions packages/router/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ function explodeOptionalSegments(path: string): string[] {
let required = first.replace(/\?$/, "");

if (rest.length === 0) {
// Intepret empty string as omitting an optional segment
// Interpret empty string as omitting an optional segment
// `["one", "", "three"]` corresponds to omitting `:two` from `/one/:two?/three` -> `/one/three`
return isOptional ? [required, ""] : [required];
}
Expand Down Expand Up @@ -1083,7 +1083,7 @@ export function decodePath(value: string) {
} catch (error) {
warning(
false,
`The URL path "${value}" could not be decoded because it is is a ` +
`The URL path "${value}" could not be decoded because it is a ` +
`malformed URL segment. This is probably due to a bad percent ` +
`encoding (${error}).`
);
Expand Down

0 comments on commit 299cd6d

Please sign in to comment.