0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00
logto/.changeset/silent-singers-trade.md
Gao Sun 5a7204571a
refactor(experience): skip non-object messages in native (#5491)
* refactor(experience): skip non-object messages in native

* chore: add changeset
2024-03-12 11:27:18 +08:00

557 B

@logto/experience
patch

skip non-object messages in the native environment

In the WKWebView of new iOS versions, some script will constantly post messages to the window object with increasing numbers as the message content ("1", "2", "3", ...).

Ideally, we should check the source of the message with Logto-specific identifier in the event.data; however, this change will result a breaking change for the existing native SDK implementations. Add the isObject check to prevent the crazy messages while keeping the backward compatibility.