Skip to content
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

[Bug] Reorder basset block checks #99

Merged
merged 1 commit into from
Sep 26, 2023
Merged

Conversation

promatik
Copy link
Contributor

The check if the script is already loaded should come first to avoid injecting same script multiple times in the page.

This bug was only happening with basset blocks, while on dev mode.

@promatik promatik added the bug Something isn't working label Sep 25, 2023
@pxpm
Copy link
Contributor

pxpm commented Sep 26, 2023

Thanks @promatik

I can confirm that:

 @bassetBlock('test')
    <script>
        console.log('test');
    </script>
    @endBassetBlock

    @bassetBlock('test')
    <script>
        console.log('test');
    </script>
    @endBassetBlock

would render the 2 script blocks in the main branch and in this branch it renders only one as expected.

Cheers

@pxpm pxpm merged commit cbe1c9d into main Sep 26, 2023
3 checks passed
@pxpm pxpm deleted the reorder-basset-block-checks branch September 26, 2023 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants