refactor(facade): Inline isBlank called with object-type argument (#11992)

This commit is contained in:
Alex Eagle
2016-09-30 09:26:53 -07:00
committed by Chuck Jazdzewski
parent e884f4854d
commit 0286956107
49 changed files with 119 additions and 137 deletions

View File

@ -722,7 +722,7 @@ class _DuplicateMap {
var key = getMapKey(trackById);
var recordList = this.map.get(key);
return isBlank(recordList) ? null : recordList.get(trackById, afterIndex);
return recordList ? recordList.get(trackById, afterIndex) : null;
}
/**

View File

@ -8,7 +8,7 @@
import {Optional, Provider, SkipSelf} from '../../di';
import {ListWrapper} from '../../facade/collection';
import {getTypeNameForDebugging, isBlank, isPresent} from '../../facade/lang';
import {getTypeNameForDebugging, isPresent} from '../../facade/lang';
import {ChangeDetectorRef} from '../change_detector_ref';
@ -82,7 +82,7 @@ export class IterableDiffers {
return {
provide: IterableDiffers,
useFactory: (parent: IterableDiffers) => {
if (isBlank(parent)) {
if (!parent) {
// Typically would occur when calling IterableDiffers.extend inside of dependencies passed
// to
// bootstrap(), which would override default pipes instead of extending them.

View File

@ -8,7 +8,7 @@
import {Optional, Provider, SkipSelf} from '../../di';
import {ListWrapper} from '../../facade/collection';
import {isBlank, isPresent} from '../../facade/lang';
import {isPresent} from '../../facade/lang';
import {ChangeDetectorRef} from '../change_detector_ref';
@ -72,7 +72,7 @@ export class KeyValueDiffers {
return {
provide: KeyValueDiffers,
useFactory: (parent: KeyValueDiffers) => {
if (isBlank(parent)) {
if (!parent) {
// Typically would occur when calling KeyValueDiffers.extend inside of dependencies passed
// to
// bootstrap(), which would override default pipes instead of extending them.