mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-14 11:05:41 +05:00
There was code to handle unparseable messages from things like third party browser extensions but it caught a JSON parsing error, logged an error and then continued, which would throw an unhandled exception trying to read the `ack` property of `data` which had been left as `undefined`. Add a `return` to abort execution of the handler function and ignore the message instead. Also changes the error to warning, since it's not a fatal error. Add a comment to clarify the behaviour. From the existing comment, it looks like this was the original intention of the code, but the `return` was simply missed. |
||
|---|---|---|
| .. | ||
| async-store.js | ||
| cache-store.js | ||
| calendar.js | ||
| cursor.js | ||
| history.js | ||
| invitation.js | ||
| local-store.js | ||
| login-block.js | ||
| mailbox-handlers.js | ||
| mailbox.js | ||
| messenger.js | ||
| network-config.js | ||
| noworker.js | ||
| onlyoffice.js | ||
| profile.js | ||
| roster.js | ||
| serviceworker.js | ||
| sharedfolder.js | ||
| sharedworker.js | ||
| store-rpc.js | ||
| team.js | ||
| testworker.js | ||
| upload.js | ||
| userObject.js | ||
| webworker.js | ||
| worker-channel.js | ||
| x2t.js | ||