mediawiki.Title: Remove unnecessary type check on private function
authorFomafix <fomafix@googlemail.com>
Sat, 4 Aug 2018 17:43:06 +0000 (19:43 +0200)
committerFomafix <fomafix@googlemail.com>
Sat, 4 Aug 2018 17:50:59 +0000 (19:50 +0200)
The private function text() is always called with type string.

Change-Id: I5c473215eae4d6da5070478e36156740c1a0a11e

resources/src/mediawiki.Title/Title.js

index c02af98..1d0aa67 100644 (file)
                 * @return {string}
                 */
                text = function ( s ) {
-                       if ( s !== null && s !== undefined ) {
-                               return s.replace( /_/g, ' ' );
-                       } else {
-                               return '';
-                       }
+                       return s.replace( /_/g, ' ' );
                },
 
                /**