fix(ivy): improve assert error message (#30453)

PR Close #30453
This commit is contained in:
Misko Hevery 2019-05-14 21:32:10 -07:00 committed by Jason Aden
parent 975845596d
commit 300f1b289a
1 changed files with 3 additions and 2 deletions

View File

@ -36,8 +36,9 @@ export function assertPreviousIsParent(isParent: boolean) {
assertEqual(isParent, true, 'previousOrParentTNode should be a parent');
}
export function assertHasParent(tNode: TNode) {
assertDefined(tNode.parent, 'previousOrParentTNode should have a parent');
export function assertHasParent(tNode: TNode | null) {
assertDefined(tNode, 'previousOrParentTNode should exist!');
assertDefined(tNode !.parent, 'previousOrParentTNode should have a parent');
}
export function assertDataNext(lView: LView, index: number, arr?: any[]) {