浏览代码

Docs: Adjusted Collection constructor's code snippet.

Co-Authored-By: Piotrek Koszuliński <pkoszulinski@gmail.com>
Marek Lewandowski 5 年之前
父节点
当前提交
0859dbe6cb
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      packages/ckeditor5-utils/src/collection.js

+ 1 - 0
packages/ckeditor5-utils/src/collection.js

@@ -54,6 +54,7 @@ export default class Collection {
 	 *		const nonEmptyCollection = new Collection( [ { name: 'John' } ], { idProperty: 'name' } );
 	 *		nonEmptyCollection.add( { name: 'George' } );
 	 *		console.log( collection.get( 'George' ) ); // -> { name: 'George' }
+	 *		console.log( collection.get( 'John' ) ); // -> { name: 'John' }
 	 *
 	 * @param {Iterable.<Object>|Object} initialItemsOrOptions The initial items of the collection or
 	 * the options object.