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

SyntaxError in Safari #110

Open
konstantinkreft opened this issue Apr 28, 2022 · 3 comments
Open

SyntaxError in Safari #110

konstantinkreft opened this issue Apr 28, 2022 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@konstantinkreft
Copy link

Describe the bug
When using this polyfill (>= v3.0.4) Safari throws a SyntaxError: The string did not match the expected pattern. which results in not applying any styles.
I can only reproduce this error when using the polyfill with twind. So it could also be a bug of twind but it works with [email protected] so I'm not really sure.

Safari is highlighting these lines in the error.

.forEach((command) =>
adopter.sheet![command.method].apply(adopter.sheet!, command.args),
);

To Reproduce
Steps to reproduce the behavior:
Preview with error in console
CodeSandbox

Expected behavior
To not throw SyntaxError: The string did not match the expected pattern.

Desktop (please complete the following information):

  • OS: [macOS]
  • Browser [safari]
  • Version [15.4]

Additional context
This error only occurs when using with twind so I'm not entirely sure which package is to blame 🤷‍♂️
It is working up until version 3.0.3 of construct-style-sheets-polyfill.

@PlusUltra404
Copy link

@konstantinkreft
Hello,
I am a senior at Clemson University completing a Bachelor's in Computer Science. Would I be able to help assist in this Issue? For my final assignment I need to contribute to an active repository and I believe I would be a good resource for this issue as I have good experience in React.

@calebdwilliams
Copy link
Owner

@PlusUltra404 Yeah, I'd be happy to field a PR from this. Let me know if you need anything including help in figuring out what's going on. I think I might know (hint there's a former PR or issue that might be related).

@calebdwilliams calebdwilliams added the bug Something isn't working label Apr 28, 2022
@konstantinkreft
Copy link
Author

@PlusUltra404 Sure, that would be great!

Since it breaks with v3.0.4 we can narrow it down to this commit: 4e03571

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants