Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Merge faac1f6 into ca21a66
Browse files Browse the repository at this point in the history
  • Loading branch information
pomek committed Jan 22, 2019
2 parents ca21a66 + faac1f6 commit bfde1c0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
5 changes: 2 additions & 3 deletions src/model/documentselection.js
Original file line number Diff line number Diff line change
Expand Up @@ -1017,10 +1017,9 @@ class LiveSelection extends Selection {
break;
}

// This is not an optimal solution because of https://github.com/ckeditor/ckeditor5-engine/issues/454.
// It can be done better by using `break;` instead of checking `attrs === null`.
if ( value.type == 'text' && attrs === null ) {
if ( value.type == 'text' ) {
attrs = value.item.getAttributes();
break;
}
}
} else {
Expand Down
6 changes: 1 addition & 5 deletions src/view/element.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,7 @@ export default class Element extends Node {
yield 'style';
}

// This is not an optimal solution because of https://github.com/ckeditor/ckeditor5-engine/issues/454.
// It can be simplified to `yield* this._attrs.keys();`.
for ( const key of this._attrs.keys() ) {
yield key;
}
yield* this._attrs.keys();
}

/**
Expand Down

0 comments on commit bfde1c0

Please sign in to comment.