// Trim underscores
.replace( rUnderscoreTrim, '' );
- if ( title === '' ) {
- return false;
- }
-
// Process initial colon
- if ( title.charAt( 0 ) === ':' ) {
+ if ( title !== '' && title.charAt( 0 ) === ':' ) {
// Initial colon means main namespace instead of specified default
namespace = NS_MAIN;
title = title
.replace( rUnderscoreTrim, '' );
}
+ if ( title === '' ) {
+ return false;
+ }
+
// Process namespace prefix (if any)
m = title.match( rSplit );
if ( m ) {