Skip to content

Commit

Permalink
fix: don't defer Pinecone bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
greatislander committed Feb 20, 2020
1 parent 867b3a5 commit 1c8b7cf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/components/_preview.njk
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<script>(function(html){html.className = html.className.replace(/\bno-js\b/,'js')})(document.documentElement);</script>
<script src="{{ '/scripts/pinecone.umd.js' | path }}" defer></script>
<script src="{{ '/scripts/pinecone.umd.js' | path }}"></script>
<script src="{{ '/scripts/pinecone.js' | path }}" defer></script>
<link rel="stylesheet" href="{{ '/styles/pinecone.css' | path }}">
<link rel="apple-touch-icon" sizes="180x180" href="{{ '/images/apple-touch-icon.png' | path }}">
Expand Down
4 changes: 2 additions & 2 deletions src/components/layouts/search-results/search-results.njk
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@
</ul>
</div>
{% render '@pagination', {title: false}, true %}
<script>
<script defer>
const dialogBtn = document.getElementById( 'save-search' );
if ( dialogBtn ) {
new window.Pinecone.Dialog( dialogBtn, {
new Pinecone.Dialog( dialogBtn, {
title: "{{ dialogTitle | safe }}",
question: "{{ dialogQuestion | safe }}",
input: "{{ dialogInput }}",
Expand Down
4 changes: 2 additions & 2 deletions src/components/molecules/dialog/dialog.njk
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{% if not standAlone %}<div class="spacer"></div>{% endif %}
{% render '@button--borderless', {label: buttonLabel, id: 'invoke-dialog', icon: buttonIcon, iconPosition: 'start', standAlone: true}, true %}
<script>
<script defer>
const dialogBtn = document.getElementById( 'invoke-dialog' );
if ( dialogBtn ) {
new window.Pinecone.Dialog( dialogBtn, {
new Pinecone.Dialog( dialogBtn, {
title: "{{ dialogTitle | safe }}",
question: "{{ dialogQuestion | safe }}",
{% if dialogInput %}
Expand Down

0 comments on commit 1c8b7cf

Please sign in to comment.