Skip to content

Commit

Permalink
fix(web): null-guard for a new property
Browse files Browse the repository at this point in the history
  • Loading branch information
jahorton committed Oct 6, 2023
1 parent ac24035 commit 7c81fc6
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,12 @@ export class GestureSequence<Type> extends EventEmitter<EventMap<Type>> {
* current state. They will be specified in descending `resolutionPriority` order.
*/
public get potentialModelMatchIds(): string[] {
// If `this.selector` is null, it's because no further matches are possible.
// We've already emitted the 'complete' event as well.
if(!this.selector) {
return [];
}

// The new round of model-matching is based on the sources used by the previous round.
// This is important; 'sustainTimer' gesture models may rely on a now-terminated source
// from that previous round (like with multitaps).
Expand Down

0 comments on commit 7c81fc6

Please sign in to comment.