build: Replace jscs+jshint with eslint
[lhc/web/wiklou.git] / resources / src / mediawiki.action / mediawiki.action.edit.stash.js
index 6c63957..c8d3fad 100644 (file)
@@ -1,6 +1,7 @@
 /*!
  * Scripts for pre-emptive edit preparing on action=edit
  */
+/* eslint-disable no-use-before-define */
 ( function ( mw, $ ) {
        if ( !mw.config.get( 'wgAjaxEditStash' ) ) {
                return;
                        if (
                                // Reverts may involve use (undo) links; stash as they review the diff.
                                // Since the form has a pre-filled summary, stash the edit immediately.
-                               mw.util.getParamValue( 'undo' ) !== null
+                               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
+                               $.inArray( $form.find( '#mw-edit-mode' ).val(), [ 'preview', 'diff' ] ) > -1
                        ) {
                                checkStash();
                        }