Bug 1401528 - do not reference non-existent args[1] in fakeserver smtpd.js. r=jcranmer
--- a/mailnews/test/fakeserver/smtpd.js
+++ b/mailnews/test/fakeserver/smtpd.js
@@ -71,17 +71,17 @@ SMTP_RFC2821_handler.prototype = {
var scheme = args[0].toUpperCase();
// |scheme| contained in |kAuthSchemes|?
if (!this.kAuthSchemes.some(function (s) { return s == scheme; }))
return "504 AUTH " + scheme + " not supported";
var func = this._kAuthSchemeStartFunction[scheme];
if (!func || typeof(func) != "function")
return "504 I just pretended to implement AUTH " + scheme + ", but I don't";
dump("Starting AUTH " + scheme + "\n");
- return func.call(this, args[1]);
+ return func.call(this, ((args.length > 1) ? args[1] : undefined));
},
MAIL: function (args) {
if (this._state == kStateAuthNeeded)
return "530 5.7.0 Authentication required";
return "250 ok";
},
RCPT: function(args) {
if (this._state == kStateAuthNeeded)