fix(common): KeyValuePipe should return empty array for empty objects (#27258)
This lets KeyValuePipe return an empty array (rather than undefined) when the input is empty. PR Close #27258
This commit is contained in:
@ -47,10 +47,8 @@ export interface KeyValue<K, V> {
|
||||
export class KeyValuePipe implements PipeTransform {
|
||||
constructor(private readonly differs: KeyValueDiffers) {}
|
||||
|
||||
// TODO(issue/24571): remove '!'.
|
||||
private differ !: KeyValueDiffer<any, any>;
|
||||
// TODO(issue/24571): remove '!'.
|
||||
private keyValues !: Array<KeyValue<any, any>>;
|
||||
private keyValues: Array<KeyValue<any, any>> = [];
|
||||
|
||||
transform<K, V>(input: null, compareFn?: (a: KeyValue<K, V>, b: KeyValue<K, V>) => number): null;
|
||||
transform<V>(
|
||||
|
Reference in New Issue
Block a user