Merge "Improve "selfmove" message's wording"
[lhc/web/wiklou.git] / resources / src / mediawiki / mediawiki.notification.js
index 4849f5a..dfacfc6 100644 (file)
@@ -35,7 +35,7 @@
 
                if ( options.tag ) {
                        // Sanitize options.tag before it is used by any code. (Including Notification class methods)
-                       options.tag = options.tag.replace( /[ _\-]+/g, '-' ).replace( /[^\-a-z0-9]+/ig, '' );
+                       options.tag = options.tag.replace( /[ _-]+/g, '-' ).replace( /[^-a-z0-9]+/ig, '' );
                        if ( options.tag ) {
                                $notification.addClass( 'mw-notification-tag-' + options.tag );
                        } else {
@@ -45,7 +45,7 @@
 
                if ( options.type ) {
                        // Sanitize options.type
-                       options.type = options.type.replace( /[ _\-]+/g, '-' ).replace( /[^\-a-z0-9]+/ig, '' );
+                       options.type = options.type.replace( /[ _-]+/g, '-' ).replace( /[^-a-z0-9]+/ig, '' );
                        $notification.addClass( 'mw-notification-type-' + options.type );
                }
 
                defaults: {
                        autoHide: true,
                        autoHideSeconds: 'short',
-                       tag: false,
-                       title: undefined,
-                       type: false
+                       tag: null,
+                       title: null,
+                       type: null
                },
 
                /**