From 325e7c03b8e533b5394ae1dc253e5688eb266244 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 802f14a4a9c36..a5e72f38fae85 100644 --- a/superset/templates/superset/basic.html +++ b/superset/templates/superset/basic.html @@ -16,23 +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('theme') %} + {% for entry in get_unloaded_chunks(js_manifest('theme'), loaded_chunks) %} {% endfor %} - {% for entry in js_manifest('common') %} + {% for entry in get_unloaded_chunks(js_manifest('common'), loaded_chunks) %} {% endfor %} @@ -80,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 %}