
committed by
Misko Hevery

parent
fa8e059f28
commit
d0059b5d75
@ -15,16 +15,16 @@ export class PipeRegistry {
|
||||
get(type:string, obj, cdRef:ChangeDetectorRef):Pipe {
|
||||
var listOfConfigs = this.config[type];
|
||||
if (isBlank(listOfConfigs)) {
|
||||
throw new BaseException(`Cannot find a pipe for type '${type}' object '${obj}'`);
|
||||
throw new BaseException(`Cannot find '${type}' pipe supporting object '${obj}'`);
|
||||
}
|
||||
|
||||
var matchingConfig = ListWrapper.find(listOfConfigs,
|
||||
(pipeConfig) => pipeConfig.supports(obj));
|
||||
|
||||
if (isBlank(matchingConfig)) {
|
||||
throw new BaseException(`Cannot find a pipe for type '${type}' object '${obj}'`);
|
||||
throw new BaseException(`Cannot find '${type}' pipe supporting object '${obj}'`);
|
||||
}
|
||||
|
||||
return matchingConfig.create(cdRef);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user