Fix JavaScript errors when page is not in workflow

pull/6257/head
Karl Hobley 2020-02-18 12:30:53 +00:00 zatwierdzone przez Matt Westcott
rodzic e962ad6004
commit cb692e5c79
1 zmienionych plików z 2 dodań i 0 usunięć

Wyświetl plik

@ -148,6 +148,7 @@
);
});
{% if current_task_state %}
/* When a workflow action button is pressed, trigger a POST request to the workflow_action view */
document.addEventListener('DOMContentLoaded', function() {
document.querySelectorAll('[data-workflow-action]').forEach(function (buttonElement) {
@ -185,5 +186,6 @@
}, {capture: true});
});
});
{% endif %}
</script>
{% endblock %}