refactor(facade): remove useless facades
This commit is contained in:

committed by
Rado Kirov

parent
34b31dea7c
commit
58605cf350
@ -43,10 +43,8 @@ export class FormBuilder {
|
||||
*/
|
||||
group(controlsConfig: {[key: string]: any}, extra: {[key: string]: any} = null): FormGroup {
|
||||
const controls = this._reduceControls(controlsConfig);
|
||||
const validator: ValidatorFn =
|
||||
isPresent(extra) ? StringMapWrapper.get(extra, 'validator') : null;
|
||||
const asyncValidator: AsyncValidatorFn =
|
||||
isPresent(extra) ? StringMapWrapper.get(extra, 'asyncValidator') : null;
|
||||
const validator: ValidatorFn = isPresent(extra) ? extra['validator'] : null;
|
||||
const asyncValidator: AsyncValidatorFn = isPresent(extra) ? extra['asyncValidator'] : null;
|
||||
return new FormGroup(controls, validator, asyncValidator);
|
||||
}
|
||||
/**
|
||||
|
@ -492,7 +492,7 @@ export abstract class AbstractControl {
|
||||
getError(errorCode: string, path: string[] = null): any {
|
||||
var control = isPresent(path) && !ListWrapper.isEmpty(path) ? this.get(path) : this;
|
||||
if (isPresent(control) && isPresent(control._errors)) {
|
||||
return StringMapWrapper.get(control._errors, errorCode);
|
||||
return control._errors[errorCode];
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
Reference in New Issue
Block a user