fix(animations): properly support the query limit option value
Closes #19232
This commit is contained in:

committed by
Victor Berchet

parent
e889c68aff
commit
b54368bf35
@ -556,7 +556,11 @@ export class AnimationTimelineContext {
|
||||
}
|
||||
if (selector.length > 0) { // if :self is only used then the selector is empty
|
||||
const multi = limit != 1;
|
||||
results.push(...this._driver.query(this.element, selector, multi));
|
||||
let elements = this._driver.query(this.element, selector, multi);
|
||||
if (limit !== 0) {
|
||||
elements = elements.slice(0, limit);
|
||||
}
|
||||
results.push(...elements);
|
||||
}
|
||||
|
||||
if (!optional && results.length == 0) {
|
||||
|
Reference in New Issue
Block a user