Bug 1542484 - fix some warnings when creating a News account. r=jorgk

This commit is contained in:
aceman 2019-04-06 07:24:00 +02:00
Родитель b2b7256fcb
Коммит 81320249b3
2 изменённых файлов: 9 добавлений и 10 удалений

Просмотреть файл

@ -448,12 +448,14 @@ function finishAccount(account, accountData)
var srcServer = accountData.incomingServer;
copyObjectToInterface(destServer, srcServer, true);
// see if there are any protocol-specific attributes
// if so, we use the type to get the IID, QueryInterface
// as appropriate, then copy the data over
dump("srcServer.ServerType-" + srcServer.type + " = " +
srcServer["ServerType-" + srcServer.type] + "\n");
if (srcServer["ServerType-" + srcServer.type]) {
// See if there are any protocol-specific attributes.
// If so, we use the type to get the IID, QueryInterface
// as appropriate, then copy the data over.
const typeProperty = "ServerType-" + srcServer.type;
let serverAttrs = (typeProperty in srcServer) ?
srcServer[typeProperty] : null;
dump(`srcServer.${typeProperty} = ${serverAttrs}\n`);
if (serverAttrs) {
// handle server-specific stuff
var IID;
try {

Просмотреть файл

@ -64,11 +64,8 @@ function incomingPageInit() {
{
var newsServer = document.getElementById("newsServer");
var pageData = parent.GetPageData();
try
{
if (pageData.newsserver && pageData.newsserver.hostname)
newsServer.value = pageData.newsserver.hostname.value;
}
catch (ex){}
}
var incomingServerbox = document.getElementById("incomingServerbox");