-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check if getScts exists and is a function #101
base: master
Are you sure you want to change the base?
Conversation
error: TypeError: message.getScts is not a function trace: /lib/functions/modem.js line 1589 solution: check first if "getScts" exist on the message obj and must be type function
@@ -163,7 +163,7 @@ module.exports = function(SerialPort) { | |||
resultData.data = self.arrangeMessages(resultData.data) | |||
modem.emit('onNewMessageIndicator', resultData) | |||
modem.emit('onNewMessage', resultData.data[resultData.data.length - 1]) | |||
if (modem.autoDeleteOnReceive) { | |||
if (modem.autoDeleteOnReceive && typeof message != 'undefined' ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (modem.autoDeleteOnReceive && typeof message != 'undefined' ) { | |
if (modem.autoDeleteOnReceive && typeof message !== 'undefined' ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
äääähhmm .... where does "message" come from? or am I blind? There is no message initialized in this block ... ?!?
Honestly ... I'm nit that sure because the interesting topic would be to understand WHY it is no function ... and in the other case WHY message is undefined zto make sure it is not a "flow" topic |
Can you please provide a logging or more details in whcih cases these issues happened ? |
@mejuliver Plese check if the issue still occurs in 4.0.1 |
@zabsalahid I would close this PR because no reaction |
error: TypeError: message.getScts is not a function
trace: /lib/functions/modem.js line 1589
solution: check first if "getScts" exist on the message obj and must be type function