You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Unexpected token ." on "})?.classGroupId;" due to no optional chaining operator support in certain node_modules runtimes, via tailwind-merge usage.
#128
Closed
nicksergeant opened this issue
Nov 29, 2023
· 1 comment
Started seeing some Sentries via tailwind-merge originating from tailwind-variants:
}
var classRest = classParts.join(CLASS_PART_SEPARATOR);
return classPartObject.validators.find(function (_ref) {
var validator = _ref.validator;
return validator(classRest);
})?.classGroupId;
}
var arbitraryPropertyRegex = /^\[(.+)\]$/;
function getGroupIdForArbitraryProperty(className) {
if (arbitraryPropertyRegex.test(className)) {
var arbitraryPropertyClassName = arbitraryPropertyRegex.exec(className)[1];
To Reproduce
Install tailwind-variants in a new Next.js project and run in the app in a browser that doesn't natively support optional chaining operator. Chrome 60.0.3112 on Windows 7 is a good example.
nicksergeant
changed the title
"Unexpected token ." on "})?.classGroupId;" due to no optional chaining operator support in certain node_modules runtimes.
"Unexpected token ." on "})?.classGroupId;" due to no optional chaining operator support in certain node_modules runtimes, via tailwind-merge usage.
Nov 29, 2023
Describe the bug
Started seeing some Sentries via
tailwind-merge
originating fromtailwind-variants
:To Reproduce
Install
tailwind-variants
in a new Next.js project and run in the app in a browser that doesn't natively support optional chaining operator. Chrome 60.0.3112 on Windows 7 is a good example.Expected behavior
No errors.
Screenshots
No visual errors.
Potential solution
Via dcastil/tailwind-merge#344 (comment) it seems that we can upgrade
tailwind-variant
's usage oftailwind-merge
by upgrading tov2
and using:The text was updated successfully, but these errors were encountered: