Skip to content

Commit

Permalink
[fix] migration error when using $page.routeId (#7574)
Browse files Browse the repository at this point in the history
* [fix] migration error when using $page.routeId

* how did this end up there

* clarify
  • Loading branch information
dummdidumm committed Nov 9, 2022
1 parent 4ce6733 commit 7971903
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/happy-panthers-perform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': patch
---

[fix] migration error when using $page.routeId
6 changes: 6 additions & 0 deletions packages/kit/src/runtime/client/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,12 @@ export function create_client({ target, base, trailing_slash }) {
};

// TODO remove this for 1.0
Object.defineProperty(result.props.page, 'routeId', {
get() {
throw new Error('$page.routeId has been replaced by $page.route.id');
},
enumerable: false
});
/**
* @param {string} property
* @param {string} replacement
Expand Down

0 comments on commit 7971903

Please sign in to comment.