Skip to content

Commit

Permalink
Wrong variable name in onError function (#470)
Browse files Browse the repository at this point in the history
When the onError method of the btMsg object should log the body message, the function parameter is errorMsg, but the argument passed to the writeln function is eObj. The console will not log the error, because you are trying to access a property of a nonexistent object.
  • Loading branch information
creativoloco authored May 18, 2023
1 parent 377835b commit 9b24045
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ MessagingBetweenApps.prototype.run = function() {
// ESTK handles any errors that occur when sending the initial message
btMsg.onError = function( errorMsg ) {
retval = false;
$.writeln(eObj.body);
$.writeln(errorMsg.body);
}
// ESTK sends the initial message
$.writeln("MessagingBetweenApps: In ESTK - about to send initial message to Photoshop");
Expand Down Expand Up @@ -149,4 +149,4 @@ MessagingBetweenApps.prototype.canRun = function() {
*/
if(typeof(MessagingBetweenApps_unitTest) == "undefined") {
new MessagingBetweenApps().run();
}
}

0 comments on commit 9b24045

Please sign in to comment.