Skip to content

Commit 8503d56

Browse files
author
Vlad Balin
committed
Hotfix - exceptions in subsetOf
1 parent 3255b27 commit 8503d56

File tree

8 files changed

+11
-7
lines changed

8 files changed

+11
-7
lines changed

dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/relations/subsetOf.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/relations/subsetOf.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "type-r",
3-
"version": "2.0.1",
3+
"version": "2.0.2",
44
"description": "Reactive serializable data layer for modern JS applications",
55
"main": "./dist/index.js",
66
"jsnext:main": "./lib/index.js",

src/relations/subsetOf.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ function defineSubsetCollection( CollectionConstructor : typeof Collection ) {
4141
}
4242

4343
// Remove should work fine as it already accepts ids. Add won't...
44-
add( a_elements, options? ){
44+
add( a_elements, options = {} ){
4545
const { resolvedWith } = this,
4646
toAdd = toArray( a_elements );
4747

@@ -65,7 +65,7 @@ function defineSubsetCollection( CollectionConstructor : typeof Collection ) {
6565
}
6666
}
6767

68-
reset( a_elements?, options? ){
68+
reset( a_elements?, options = {} ){
6969
const { resolvedWith } = this,
7070
elements = toArray( a_elements );
7171

tests/typescript/dist/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3316,6 +3316,7 @@ function defineSubsetCollection(CollectionConstructor) {
33163316
configurable: true
33173317
});
33183318
SubsetOfCollection.prototype.add = function (a_elements, options) {
3319+
if (options === void 0) { options = {}; }
33193320
var resolvedWith = this.resolvedWith, toAdd = toArray(a_elements);
33203321
if (resolvedWith) {
33213322
return _super.prototype.add.call(this, resolveRefs(resolvedWith, toAdd), options);
@@ -3330,6 +3331,7 @@ function defineSubsetCollection(CollectionConstructor) {
33303331
}
33313332
};
33323333
SubsetOfCollection.prototype.reset = function (a_elements, options) {
3334+
if (options === void 0) { options = {}; }
33333335
var resolvedWith = this.resolvedWith, elements = toArray(a_elements);
33343336
return resolvedWith ?
33353337
_super.prototype.reset.call(this, resolveRefs(resolvedWith, elements), options) :

tests/typescript/dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)