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,
|
object['getAngularTestability'] = _jsify((Element elem,
|
||||||
bool findInAncestors) {
|
bool findInAncestors) {
|
||||||
var testability = registry.findTestabilityInTree(elem, findInAncestors);
|
var testability = registry.findTestabilityInTree(elem, findInAncestors);
|
||||||
return _jsify(new PublicTestability(testability));
|
return testability == null
|
||||||
|
? null
|
||||||
|
: _jsify(new PublicTestability(testability));
|
||||||
});
|
});
|
||||||
object['getAllAngularTestabilities'] = _jsify(() {
|
object['getAllAngularTestabilities'] = _jsify(() {
|
||||||
var publicTestabilities = registry
|
var publicTestabilities = registry
|
||||||
|
|
Loading…
Reference in New Issue