Perhaps this is a bug in Nuxt 3 or UnoCSS for vue3, but in my project there is an error that does not allow Nuxt to work correctly. The error itself occurs on this line
I fixed this problem like this in a local project, because I get an error that toUpperCase is not a function. but it seems the following option would be correct
const camelize = cacheStringFunction(
(str) => {
return str.replace(camelizeRE, (_, c) => c ? str[c].toUpperCase() : "");
}
);
What is actually happening?
const camelize = cacheStringFunction(
(str) => {
return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : "");
}
);
I don’t know what this function is for, but when outputting the value to the console, an error occurs when str = margin-top. variable c here will be a number and there is no string method on it. and it seems the function is not finalized
Vue version
^3.5.12
Link to minimal reproduction
https://iipmed.crocos.kz/
Steps to reproduce
Perhaps this is a bug in Nuxt 3 or UnoCSS for vue3, but in my project there is an error that does not allow Nuxt to work correctly. The error itself occurs on this line
What is expected?
const camelize = cacheStringFunction( (str) => { return str.replace(camelizeRE, (_, c) => c && c.toUpperCase ? c.toUpperCase() : ""); } );
I fixed this problem like this in a local project, because I get an error that toUpperCase is not a function. but it seems the following option would be correct
const camelize = cacheStringFunction( (str) => { return str.replace(camelizeRE, (_, c) => c ? str[c].toUpperCase() : ""); } );
What is actually happening?
const camelize = cacheStringFunction( (str) => { return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); } );
I don’t know what this function is for, but when outputting the value to the console, an error occurs when str = margin-top. variable c here will be a number and there is no string method on it. and it seems the function is not finalized
System Info
No response
Any additional comments?
No response