Skip to content

fix: Error when TouchManager calls addEventListener with name of type number.#109

Merged
triniwiz merged 1 commit intoNativeScript:masterfrom
ArthurMJ96:master
Jan 26, 2024
Merged

fix: Error when TouchManager calls addEventListener with name of type number.#109
triniwiz merged 1 commit intoNativeScript:masterfrom
ArthurMJ96:master

Conversation

@ArthurMJ96
Copy link
Copy Markdown
Contributor

Problem:

When an app using a global TouchManager is suspended and then resumed, the TouchManager triggers canvas.addEventListener with the type 'number' as the first argument, leading to an UncaughtJsExceptions.

  Error: Calling js method onStart failed
  TypeError: arg.toLowerCase is not a function

Solution:

Adding a conditional statement within the addEventListener extension in the canvas class. The modification ensures that the event type is a string.

@cla-bot cla-bot bot added the cla: yes label Jan 26, 2024
@triniwiz
Copy link
Copy Markdown
Member

Nice find 🔥

@triniwiz triniwiz merged commit 7ade325 into NativeScript:master Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants