GitToTheHub commented on code in PR #1643:
URL: https://github.com/apache/cordova-ios/pull/1643#discussion_r3440326481
##########
cordova-js-src/exec.js:
##########
@@ -143,7 +143,9 @@ function execProxy () {
}
execProxy.nativeFetchMessages = function () {
- return cordovaExec().nativeFetchMessages.apply(null, arguments);
+ if (cordovaExec().nativeFetchMessages) {
Review Comment:
You write in your description the reason why checking for
`cordovaExec().nativeFetchMessages` before calling it:
```markdown
execProxy.nativeFetchMessages appears to call
cordovaExec().nativeFetchMessages which is undefined as it was removed when
UIWebView was dropped in PR: https://github.com/apache/cordova-ios/pull/773
It appears that some plugins might still rely on calling
execProxy.nativeFetchMessages so this PR will wrap and check for the existence
of cordovaExec().nativeFetchMessages before attempting to call it.
Those plugins would most likely need to figure out how to re-implement
cordovaExec().nativeFetchMessages for it to work.
```
For me it would not be clear why this line of code exists. Maybe you could
add your description as documentation.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]