chore: conform to prettify

This commit is contained in:
Aetherinox 2024-04-07 12:11:43 -07:00
parent 0f8332b07a
commit fe23aa9097
No known key found for this signature in database
GPG Key ID: CB5C4C30CD0D4028
1 changed files with 2 additions and 2 deletions

View File

@ -11,9 +11,9 @@ class RandomNameGenerator {
function charCodeToHtml(char) {
// convert certain special chars like space into to non-breaking space
// ' ' to &#nbsp;
if ( char === 32 || char === 8193 || char === 8239 )
if ( char === 32 || char === 8193 || char === 8239 ) {
char = 160;
}
return Math.random( ) < 0.2 ? String.fromCharCode( char ) : `&#x${ char.toString( 16 ) };`;
}