-
Notifications
You must be signed in to change notification settings - Fork 220
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
Including the code twice #110
Comments
I had the same issue, because my command renders a view inside a job which is queued in redis. I fixed it by adding this code before my JavaScript::put() call:
|
code above does not work for me, something else is causing it, or event is registered in other way |
I have this problem as well, that queued tasks adding the JS code multiple times. Your fix got me in the right direction @codegain. However your fix checks if there has been any listener listening to add to the view, which means that if you add What I've done is in the package code itself keep track of each js that is to be added with an array with hashes in the It's not really a solution to the problem that the queue is adding multiple (unnecessary) listeners, but it is a failsafe. I'm asking for a pull request now. #129 |
The transformer works great, but I noticed it puts the JS code twice in the inclusion view. This doesn't prevent the transformer from working, but generates extra unnecessary code in the final HTML.
For instance, I created this in a Laravel Controller:
And this is what I get in the HTML:
Not big thing in my case, but if you are trying to send a big amount of information from Laravel to JS it could become an issue.
The text was updated successfully, but these errors were encountered: