Merge pull request #2726 from alphagov/fix-incorrect-use-of-inarray

$.inArray returns the same value as Array.indexOf
This commit is contained in:
Tom Byers
2019-02-04 15:23:40 +00:00
committed by GitHub

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'])) {
if (['move-to-existing-folder', 'add-new-template'].indexOf(this.currentState) !== -1) {
mode = 'dialog';
}
GOVUK.stickAtBottomWhenScrolling.setMode(mode);