Replace native Array.includes with jQuery version

This was failing with a 'Object doesn't have
method' error on IE11. Assume Babel wasn't
polyfilling Array.includes so reverting to jQuery
version for now.
This commit is contained in:
Tom Byers
2019-02-04 11:22:01 +00:00
parent 3140eb22ab
commit 7ef32a6bd9

View File

@@ -147,7 +147,7 @@
);
// use dialog mode for states which contain more than one form control
if (['move-to-existing-folder', 'add-new-template'].includes(this.currentState)) {
if ($.inArray(this.currentState, ['move-to-existing-folder', 'add-new-template'])) {
mode = 'dialog';
}
GOVUK.stickAtBottomWhenScrolling.setMode(mode);