Ensure we have a message list
This commit is contained in:
parent
a4261d2d36
commit
7f0254701c
|
@ -70,6 +70,14 @@ exports.getModule = class MessageListModule extends (
|
||||||
|
|
||||||
this.menuMethods = {
|
this.menuMethods = {
|
||||||
selectMessage: (formData, extraArgs, cb) => {
|
selectMessage: (formData, extraArgs, cb) => {
|
||||||
|
if (!Array.isArray(this.config?.messageList)) {
|
||||||
|
this.client.log.error(
|
||||||
|
{ formData },
|
||||||
|
'No message list is available to select from!'
|
||||||
|
);
|
||||||
|
return cb(null);
|
||||||
|
}
|
||||||
|
|
||||||
if (MciViewIds.allViews.msgList === formData.submitId) {
|
if (MciViewIds.allViews.msgList === formData.submitId) {
|
||||||
// 'messageIndex' or older deprecated 'message' member
|
// 'messageIndex' or older deprecated 'message' member
|
||||||
this.initialFocusIndex = _.get(
|
this.initialFocusIndex = _.get(
|
||||||
|
|
Loading…
Reference in New Issue