Update app/assets/javascripts/templateFolderForm.js

Use native `Array.indexOf` instead.

Co-Authored-By: tombye <tombaromba@gmail.com>
This commit is contained in:
Chris Hill-Scott
2019-02-04 15:17:27 +00:00
committed by GitHub
parent 0e55521d8f
commit ca6529dcdb

View File

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