浏览代码

Simplify check to pass the tests.

Maciej Gołaszewski 6 年之前
父节点
当前提交
c7d7aaa7ea
共有 1 个文件被更改,包括 1 次插入4 次删除
  1. 1 4
      packages/ckeditor5-restricted-editing/src/restrictededitingexceptioncommand.js

+ 1 - 4
packages/ckeditor5-restricted-editing/src/restrictededitingexceptioncommand.js

@@ -43,10 +43,7 @@ export default class RestrictedEditingExceptionCommand extends Command {
 				// When selection is inside a restricted text
 				if ( selection.hasAttribute( 'restrictedEditingException' ) ) {
 					// Find the full resticted range
-					const isSameRestrictedException = value => {
-						return value.item.hasAttribute( 'restrictedEditingException' ) &&
-						value.item.getAttribute( 'restrictedEditingException' ) === this.value;
-					};
+					const isSameRestrictedException = value => value.item.getAttribute( 'restrictedEditingException' ) === this.value;
 
 					const restrictedEditingExceptionStart = position.getLastMatchingPosition( isSameRestrictedException,
 						{ direction: 'backward' } );