Skip to content

SyntaxError in Safari #110

@konstantinkreft

Description

@konstantinkreft

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.

Metadata

Metadata

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions