diff --git a/client/src/collection.js b/client/src/collection.js index 3455bf4b9c..9a395d7230 100644 --- a/client/src/collection.js +++ b/client/src/collection.js @@ -233,7 +233,7 @@ class Collection { /** * Remove models or a model. * - * @param {Model[]|Model} models Models ar a model. + * @param {Model[]|Model|string} models Models, a model or a model ID. * @param {{ * silent?: boolean, * }} [options] Options. diff --git a/frontend/test/spec/test.collection.js b/frontend/test/spec/test.collection.js index d92409c2c0..ba083b38d7 100644 --- a/frontend/test/spec/test.collection.js +++ b/frontend/test/spec/test.collection.js @@ -98,6 +98,11 @@ describe('collection', () => { expect(collection.length).toBe(2); expect(collection.get('2')).toBeUndefined(); + + collection.remove('1'); + + expect(collection.length).toBe(1); + expect(collection.get('1')).toBeUndefined(); }); it('should push', () => {