Merge "Fix SamplingStatsdClient for PHP 7.1+"
[lhc/web/wiklou.git] / resources / src / mediawiki.action / mediawiki.action.edit.stash.js
index 7e966ea..5ae91e8 100644 (file)
@@ -59,6 +59,7 @@
                        }
 
                        params = {
+                               formatversion: 2,
                                action: 'stashedit',
                                title: mw.config.get( 'wgPageName' ),
                                section: section,
                        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();
                }