Skip to content

Commit

Permalink
Removed defer attribute from the avo.base.css stylesheet tag (#3635)
Browse files Browse the repository at this point in the history
`defer` isn't a valid attribute for a `<link>` tag - it is for
`<script>` tags and having it here is invalid html. I think this is also
causing loading issues in google chrome for me when I redirect from avo
to my main app.

I've removed defer from the `<link>` tag. This should make the html
valid and shouldn't have any bad effects (as it shouldn't be used on a
`<link>` tag anyway).
  • Loading branch information
iainbeeston authored Feb 4, 2025
1 parent dc8d3a0 commit 6373da3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/views/layouts/avo/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<%= render partial: "avo/partials/branding" %>
<%= render partial: "avo/partials/pre_head" %>
<%= render Avo::AssetManager::StylesheetComponent.new asset_manager: Avo.asset_manager %>
<%= stylesheet_link_tag @stylesheet_assets_path, "data-turbo-track": "reload", defer: true, as: "style" %>
<%= stylesheet_link_tag @stylesheet_assets_path, "data-turbo-track": "reload", as: "style" %>

<% path = Avo::PACKED ? "/avo-assets/avo.base" : "avo.base" %>
<%= javascript_include_tag path, "data-turbo-track": "reload", defer: true %>
Expand Down

0 comments on commit 6373da3

Please sign in to comment.