Skip to content

Commit

Permalink
fix: Error when TouchManager calls addEventListener with name of type…
Browse files Browse the repository at this point in the history
… number (#109)
  • Loading branch information
ArthurMJ96 authored Jan 26, 2024
1 parent 5463ec7 commit 7ade325
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/canvas/Canvas/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,9 @@ export abstract class CanvasBase extends View implements ICanvasBase {

public addEventListener(arg: string, callback: any, thisArg?: any) {
super.addEventListener(arg, callback, thisArg);

if (typeof arg !== 'string') {
return;
}
const eventtype = arg.toLowerCase();

switch (eventtype) {
Expand Down

0 comments on commit 7ade325

Please sign in to comment.