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

TypeError: Cannot create property 'enabled' on string 'true' SvelteKit #6328

Closed
5 of 6 tasks
julienvos opened this issue Feb 2, 2023 · 1 comment
Closed
5 of 6 tasks

Comments

@julienvos
Copy link

julienvos commented Feb 2, 2023

Check that this is really a bug

  • I confirm

Reproduction link

https://github.com/julienvos/swiper-app-demo

Bug description

When I want to use Swiper Element (Webcomponent) CDN or npm in SvelteKit I get the following error:

TypeError: Cannot create property 'enabled' on string 'true'

It refers to the function getParams(element) in get-params.js. On the if statement:

if (passedParams[name] && modulesParamsList.includes(attr.name)) {
passedParams[name].enabled = value;
} else {
passedParams[name] = value;
}
}

Sveltekit has an initial SSR on page visit. I think it has something to do with that.

Expected Behavior

A smooth running component

Actual Behavior

A brief display of a smooth running component followed by the error message with a non-functional component.

Swiper version

9.0.1

Platform/Target and Browser Versions

Windows 10 Edge

Validations

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
  • Make sure this is a Swiper issue and not a framework-specific issue

Would you like to open a PR for this bug?

  • I'm willing to open a PR
@github-actions
Copy link

github-actions bot commented Feb 2, 2023

Hello @julienvos. Please provide a online reproduction by codesandbox or a minimal GitHub repository. You can fork one of our demos in codesandbox to get start. Issues labeled by missing demo will be closed if no activities in 3 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants