refactor: misc cleanup (#11654)

This commit is contained in:
Victor Berchet
2016-09-19 17:15:57 -07:00
committed by Alex Eagle
parent 51d73d3e4e
commit 671f73448c
37 changed files with 112 additions and 196 deletions

View File

@ -7,7 +7,7 @@
*/
import {ListWrapper, StringMapWrapper} from '../facade/collection';
import {ListWrapper} from '../facade/collection';
import {hasConstructor, isBlank, isPresent, looseIdentical} from '../facade/lang';
import {FormArray, FormControl, FormGroup} from '../model';
import {Validators} from '../validators';
@ -120,8 +120,8 @@ export function composeAsyncValidators(validators: /* Array<Validator|Function>
}
export function isPropertyUpdated(changes: {[key: string]: any}, viewModel: any): boolean {
if (!StringMapWrapper.contains(changes, 'model')) return false;
var change = changes['model'];
if (!changes.hasOwnProperty('model')) return false;
const change = changes['model'];
if (change.isFirstChange()) return true;
return !looseIdentical(viewModel, change.currentValue);