-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
Assets are rendered several times #44
Comments
Casset renders each group only once, by disabling a group after it's been rendered. This means you must be adding the same file to the same group multiple times? Yeah I can see that going wrong. I think I'd prefer to prevent the second instance of the file being added to the group, if that makes sense? |
Yes, the file is hadded several times in the same group (js by default). I can have another look if you want. Still it might be more overkill. |
Hmm? I was thinking of something along the lines of if (in_array($files, static::$groups[$type][$group]['files']))
return; around about line 555? |
Hey sorry mate for my late answer. It looks like your in_array condition works properly when added just before the array_push. if (!in_array($files, static::$groups[$type][$group]['files']))
array_push(static::$groups[$type][$group]['files'], $files); |
When using Casset in partials, it renders the same file several times.
Then it causes conflicts for javascript.
Shouldn't Casset render only once each file to avoid these conflicts?
The text was updated successfully, but these errors were encountered: