Author |
|
rsantellan Newbie
Joined: 14 October 2015
Online Status: Offline Posts: 11
|
Posted: 16 October 2015 at 5:37am | IP Logged
|
|
|
Hi,
I'm using the add-suggest-contacts-example plugin.
My problem is that when composing a new email and typing the email adress the following errror happend on the app.min.js file.
TypeError: e is null
...ss.getFullEmail=function(e,t){var i="";return i=t.length>0?e.length>0?Utils.Addr...
app.min.js?762 (line 13, col 5857)
Using the app.js I found that the problem is here:
Utils.Address.getFullEmail = function (sName, sEmail)
{
var sFull = '';
if (sEmail.length > 0)
{
if (sName.length > 0)
{
if (Utils.Address.isCorrectEmail(sName) || sName.indexOf(',') !== -1)
{
sFull = '"' + sName + '" <' + sEmail + '>';
}
else
{
sFull = sName + ' <' + sEmail + '>';
}
}
else
{
sFull = sEmail;
}
}
else
{
sFull = sName;
}
return sFull;
};
This line don't check if sName is null
if (sName.length > 0)
So I add the null validation
if (sName != null && sName.length > 0)
And now works like a charm. But I don't know how to minimize the app.js the same way you guys do it so it looks the same.
How can I achieve that? Should I post in another place?
Regards!
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 16 October 2015 at 5:56am | IP Logged
|
|
|
You can actually keep using non-minified version of the file, as long as you have the following item added to array defined in data/settings/config.php file:
Code:
'labs.use-app-min-js' => false, |
|
|
If you wish to minify the file, this can be done with pretty much any JS minifier, we're using the library called Uglify for that purpose.
--
Regards,
Igor, AfterLogic Support
|
Back to Top |
|
|