From 7ef32a6bd97e2b7ce3299ee351f78a7e38cfee2f Mon Sep 17 00:00:00 2001 From: Tom Byers Date: Mon, 4 Feb 2019 11:22:01 +0000 Subject: [PATCH] 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. --- app/assets/javascripts/templateFolderForm.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/templateFolderForm.js b/app/assets/javascripts/templateFolderForm.js index 9233c88c1..18df5294c 100644 --- a/app/assets/javascripts/templateFolderForm.js +++ b/app/assets/javascripts/templateFolderForm.js @@ -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);