Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add double check for 'keepFocus' and 'noScroll' in goto to allow for backcompatibity #7678

Merged
merged 9 commits into from
Nov 16, 2022
4 changes: 2 additions & 2 deletions packages/kit/src/runtime/client/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -1202,13 +1202,13 @@ export function create_client({ target, base, trailing_slash }) {

goto: (href, opts = {}) => {
// TODO remove for 1.0
if ('keepfocus' in opts) {
if (!('keepFocus' in opts) && ('keepfocus' in opts)) {
throw new Error(
'`keepfocus` has been renamed to `keepFocus` (note the difference in casing)'
);
}

if ('noscroll' in opts) {
if (!('noScroll' in opts) && ('noscroll' in opts)) {
throw new Error(
'`noscroll` has been renamed to `noScroll` (note the difference in casing)'
);
Expand Down