From 7be74d948e5aca33fe5c9d4d47a2df08ccde04e0 Mon Sep 17 00:00:00 2001 From: Krist Wongsuphasawat Date: Tue, 18 Sep 2018 17:50:30 -0700 Subject: [PATCH] [bugfix] De-dup + {% endfor %} + {% endblock %} + {% block tail_js %} {{super()}} - {% for entry in js_manifest('common') %} + {% for entry in get_unloaded_chunks(js_manifest('common'), loaded_chunks) %} {% endfor %} {% endblock %} diff --git a/superset/templates/superset/basic.html b/superset/templates/superset/basic.html index 660ed1023066f..a5e72f38fae85 100644 --- a/superset/templates/superset/basic.html +++ b/superset/templates/superset/basic.html @@ -16,20 +16,23 @@ - {% for entry in css_manifest('theme') %} + {% for entry in get_unloaded_chunks(css_manifest('theme'), loaded_chunks) %} {% endfor %} {% if entry %} {% set entry_files = css_manifest(entry) %} - {% for entry in entry_files %} + {% for entry in get_unloaded_chunks(entry_files, loaded_chunks) %} {% endfor %} {% endif %} {% endblock %} - {% for entry in js_manifest('common') %} + {% for entry in get_unloaded_chunks(js_manifest('theme'), loaded_chunks) %} + + {% endfor %} + {% for entry in get_unloaded_chunks(js_manifest('common'), loaded_chunks) %} {% endfor %} @@ -77,7 +80,7 @@ {% block tail_js %} {% if entry %} {% set entry_files = js_manifest(entry) %} - {% for entry in entry_files %} + {% for entry in get_unloaded_chunks(entry_files, loaded_chunks) %} {% endfor %} {% endif %} diff --git a/superset/templates/superset/partials/_script_tag.html b/superset/templates/superset/partials/_script_tag.html index fd049a78834aa..f530c7bd4038b 100644 --- a/superset/templates/superset/partials/_script_tag.html +++ b/superset/templates/superset/partials/_script_tag.html @@ -1,5 +1,5 @@ {% block tail_js %} - {% for entry in js_manifest(filename) %} + {% for entry in get_unloaded_chunks(js_manifest(filename), loaded_chunks) %} {% endfor %} {% endblock %}