Преглед изворни кода

Docs and code refactoring.

Aleksander Nowodzinski пре 6 година
родитељ
комит
8c0ec60905
1 измењених фајлова са 5 додато и 4 уклоњено
  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;
 	}() )
 };