Explorar el Código

Changed: MarkerCollection#getMarkersGroup - indexOf -> startsWith.

Szymon Cofalik hace 9 años
padre
commit
23d2916361
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      packages/ckeditor5-engine/src/model/markercollection.js

+ 1 - 1
packages/ckeditor5-engine/src/model/markercollection.js

@@ -143,7 +143,7 @@ export default class MarkerCollection {
 	 */
 	*getMarkersGroup( prefix ) {
 		for ( let marker of this._markers.values() ) {
-			if ( marker.name.indexOf( prefix + ':' ) === 0 ) {
+			if ( marker.name.startsWith( prefix + ':' ) ) {
 				yield marker;
 			}
 		}