Merge "Fix SamplingStatsdClient for PHP 7.1+"
[lhc/web/wiklou.git] / resources / src / mediawiki.action / mediawiki.action.edit.stash.js
index 31c22af..5ae91e8 100644 (file)
                        mw.util.getParamValue( 'undo' ) !== null ||
                        // Pressing "show changes" and "preview" also signify that the user will
                        // probably save the page soon
-                       $.inArray( $form.find( '#mw-edit-mode' ).val(), [ 'preview', 'diff' ] ) > -1
+                       [ 'preview', 'diff' ].indexOf( $form.find( '#mw-edit-mode' ).val() ) > -1
                ) {
                        checkStash();
                }