Skip to content

Commit 8c0e4fd

Browse files
committed
fix(animations): skip InvisibleNodes when querying for elements
1 parent 3fc7fba commit 8c0e4fd

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Diff for: nativescript-angular/animations/animation-driver.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
Keyframe,
88
dashCaseToCamelCase,
99
} from "./utils";
10-
import { NgView } from "../element-registry";
10+
import { NgView, InvisibleNode } from "../element-registry";
1111
import { animationsLog as traceLog } from "../trace";
1212

1313
import { createSelector, SelectorCore } from "tns-core-modules/ui/styling/css-selector";
@@ -61,8 +61,13 @@ export class NativeScriptAnimationDriver implements AnimationDriver {
6161

6262
let results = [];
6363
eachDescendant(element, child => {
64+
if (child instanceof InvisibleNode) {
65+
return true;
66+
}
67+
6468
if (nsSelectors.some(s => s.match(child)) ||
6569
classSelectors.some(s => this.hasClass(child, s))) {
70+
6671
results.push(child);
6772
return multi;
6873
}

0 commit comments

Comments
 (0)