@@ -81,7 +81,6 @@ export class FilterBase {
81
81
: undefined ,
82
82
} ) ;
83
83
}
84
-
85
84
let target = this . target ;
86
85
while ( target . target !== undefined ) {
87
86
if ( TargetGuards . isTargetRef ( target . target ) ) {
@@ -222,32 +221,32 @@ export class FilterRef<T> implements Filter<T> {
222
221
223
222
public byRef < K extends RefKeys < T > & string > ( linkOn : K ) : Filter < ExtractCrossReferenceType < T [ K ] > > {
224
223
this . target . target = { type_ : 'single' , linkOn : linkOn } ;
225
- return new FilterRef < ExtractCrossReferenceType < T [ K ] > > ( this . target ) ;
224
+ return new FilterRef < ExtractCrossReferenceType < T [ K ] > > ( Object . assign ( { } , this . target ) ) ;
226
225
}
227
226
228
227
public byRefMultiTarget < K extends RefKeys < T > & string > ( linkOn : K , targetCollection : string ) {
229
228
this . target . target = { type_ : 'multi' , linkOn : linkOn , targetCollection : targetCollection } ;
230
- return new FilterRef < ExtractCrossReferenceType < T [ K ] > > ( this . target ) ;
229
+ return new FilterRef < ExtractCrossReferenceType < T [ K ] > > ( Object . assign ( { } , this . target ) ) ;
231
230
}
232
231
233
232
public byProperty < K extends NonRefKeys < T > & string > ( name : K , length = false ) {
234
- return new FilterProperty < T [ K ] > ( name , length , this . target ) ;
233
+ return new FilterProperty < T [ K ] > ( name , length , Object . assign ( { } , this . target ) ) ;
235
234
}
236
235
237
236
public byRefCount < K extends RefKeys < T > & string > ( linkOn : K ) {
238
- return new FilterCount ( linkOn , this . target ) ;
237
+ return new FilterCount ( linkOn , Object . assign ( { } , this . target ) ) ;
239
238
}
240
239
241
240
public byId ( ) {
242
- return new FilterId ( this . target ) ;
241
+ return new FilterId ( Object . assign ( { } , this . target ) ) ;
243
242
}
244
243
245
244
public byCreationTime ( ) {
246
- return new FilterCreationTime ( this . target ) ;
245
+ return new FilterCreationTime ( Object . assign ( { } , this . target ) ) ;
247
246
}
248
247
249
248
public byUpdateTime ( ) {
250
- return new FilterUpdateTime ( this . target ) ;
249
+ return new FilterUpdateTime ( Object . assign ( { } , this . target ) ) ;
251
250
}
252
251
}
253
252
0 commit comments