fix(testability): properly throw when no testability available
This commit is contained in:
parent
296851797b
commit
841206c678
|
@ -114,7 +114,9 @@ class GetTestability {
|
|||
object['getAngularTestability'] = _jsify((Element elem,
|
||||
bool findInAncestors) {
|
||||
var testability = registry.findTestabilityInTree(elem, findInAncestors);
|
||||
return _jsify(new PublicTestability(testability));
|
||||
return testability == null
|
||||
? null
|
||||
: _jsify(new PublicTestability(testability));
|
||||
});
|
||||
object['getAllAngularTestabilities'] = _jsify(() {
|
||||
var publicTestabilities = registry
|
||||
|
|
Loading…
Reference in New Issue