Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: sveltejs/kit
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: @sveltejs/kit@1.0.0-next.425
Choose a base ref
...
head repository: sveltejs/kit
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: @sveltejs/kit@1.0.0-next.426
Choose a head ref
  • 2 commits
  • 5 files changed
  • 3 contributors

Commits on Aug 19, 2022

  1. fix #6080 (#6082)

    Rich-Harris authored Aug 19, 2022
    Copy the full SHA
    4eacb4d View commit details
  2. Version Packages (next) (#6083)

    Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    github-actions[bot] and github-actions[bot] authored Aug 19, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    69655bc View commit details
Showing with 14 additions and 2 deletions.
  1. +5 −0 .changeset/lazy-ants-watch.md
  2. +1 −0 .changeset/pre.json
  3. +6 −0 packages/kit/CHANGELOG.md
  4. +1 −1 packages/kit/package.json
  5. +1 −1 packages/kit/src/runtime/client/client.js
5 changes: 5 additions & 0 deletions .changeset/lazy-ants-watch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': patch
---

Avoid using [].at(-1) in the client
1 change: 1 addition & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
@@ -469,6 +469,7 @@
"late-monkeys-call",
"late-mugs-agree",
"lazy-actors-add",
"lazy-ants-watch",
"lazy-berries-decide",
"lazy-carpets-join",
"lazy-mice-smile",
6 changes: 6 additions & 0 deletions packages/kit/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @sveltejs/kit

## 1.0.0-next.426

### Patch Changes

- Avoid using [].at(-1) in the client ([#6082](https://github.com/sveltejs/kit/pull/6082))

## 1.0.0-next.425

### Patch Changes
2 changes: 1 addition & 1 deletion packages/kit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sveltejs/kit",
"version": "1.0.0-next.425",
"version": "1.0.0-next.426",
"repository": {
"type": "git",
"url": "https://github.com/sveltejs/kit",
2 changes: 1 addition & 1 deletion packages/kit/src/runtime/client/client.js
Original file line number Diff line number Diff line change
@@ -345,7 +345,7 @@ export function create_client({ target, base, trailing_slash }) {
page = navigation_result.props.page;
}

const leaf_node = navigation_result.state.branch.at(-1);
const leaf_node = navigation_result.state.branch[navigation_result.state.branch.length - 1];
router_enabled = leaf_node?.node.shared?.router !== false;

if (callback) callback();