Closed karianpour closed 5 years ago
When I execute modem.setModemMode(callback) I get the error TypeError: message.getScts is not a function.
modem.setModemMode(callback)
TypeError: message.getScts is not a function
I checked the matter and I found that in my modem there is a Submit message ( it is kind of un-sent message), the rest of the messages are Deliver.
Submit
Deliver
I guess that in modem.js line 755 we have to check the type of message parameter. If it does not have getScts, then assigning null :
modem.js
message
getScts
null
dateTimeSent: (message.getScts ? new Date(message.getScts().getIsoString()) : null) || null,
@karianpour will update the code. Thanks!
Hello @karianpour ! Just updated the code base on your suggestion. Thanks for checking out serialport-gsm!
When I execute
modem.setModemMode(callback)
I get the errorTypeError: message.getScts is not a function
.I checked the matter and I found that in my modem there is a
Submit
message ( it is kind of un-sent message), the rest of the messages areDeliver
.I guess that in
modem.js
line 755 we have to check the type ofmessage
parameter. If it does not havegetScts
, then assigningnull
: