Browse Source

Docs and code refactoring.

Aleksander Nowodzinski 6 years ago
parent
commit
8c0ec60905
1 changed files with 5 additions and 4 deletions
  1. 5 4
      packages/ckeditor5-mention/src/featuredetection.js

+ 5 - 4
packages/ckeditor5-mention/src/featuredetection.js

@@ -20,16 +20,17 @@ export default {
 	 * @type {Boolean}
 	 */
 	isUnicodeGroupSupported: ( function() {
-		let unicodeGroup = false;
-		// Feature detection for Unicode groups. It's added in ES2018. Currently Firefox and Edge does not support it.
+		let isSupported = false;
+
+		// Feature detection for Unicode groups. Added in ES2018. Currently Firefox and Edge do not support it.
 		// See https://github.com/ckeditor/ckeditor5-mention/issues/44#issuecomment-487002174.
 
 		try {
-			unicodeGroup = 'ć'.search( new RegExp( '[\\p{L}]', 'u' ) ) === 0;
+			isSupported = 'ć'.search( new RegExp( '[\\p{L}]', 'u' ) ) === 0;
 		} catch ( error ) {
 			// Firefox throws a SyntaxError when the group is unsupported.
 		}
 
-		return unicodeGroup;
+		return isSupported;
 	}() )
 };