Hygiene: inline util.noop

Replace mobile.startup/util.noop with inlined implementation,
`function() {}`, to reduce indirect dependencies on jQuery (.noop).

Change-Id: I48368ef6cf03fd67e117c9bf8612bbddb7d250c5
This commit is contained in:
Stephen Niedzielski 2018-10-01 12:54:52 -06:00
parent 1a89047d3b
commit 77646a40c3

View file

@ -3,7 +3,6 @@
skin = M.require( 'skins.minerva.scripts/skin' ), skin = M.require( 'skins.minerva.scripts/skin' ),
page = M.getCurrentPage(), page = M.getCurrentPage(),
router = require( 'mediawiki.router' ), router = require( 'mediawiki.router' ),
util = M.require( 'mobile.startup/util' ),
ReferencesGateway = M.require( 'mobile.references.gateway/ReferencesGateway' ), ReferencesGateway = M.require( 'mobile.references.gateway/ReferencesGateway' ),
ReferencesMobileViewGateway = M.require( ReferencesMobileViewGateway = M.require(
'mobile.references.gateway/ReferencesMobileViewGateway' 'mobile.references.gateway/ReferencesMobileViewGateway'
@ -59,7 +58,7 @@
// Previously showReference method returns nothing so we check its truthy // Previously showReference method returns nothing so we check its truthy
// Can be removed when I5a7b23f60722eb5017a85c68f38844dd460f8b63 is merged. // Can be removed when I5a7b23f60722eb5017a85c68f38844dd460f8b63 is merged.
if ( result ) { if ( result ) {
result.then( util.noop, function ( err ) { result.then( function () {}, function ( err ) {
if ( err === ReferencesGateway.ERROR_NOT_EXIST ) { if ( err === ReferencesGateway.ERROR_NOT_EXIST ) {
router.navigate( href ); router.navigate( href );
} }