Fix a couple of coffee to js conversion blunders
This commit is contained in:
1 parent
476532af54
commit
91626a3de5
2 files changed
+4
-2
No files matched your search
@@ -831,7 +831,7 @@ function getDueTasks(deviceId, timestamp, callback) {
|
|||||||
if (res[0]) {
|
if (res[0]) {
|
||||||
if (!task.fileType) task.fileType = res[0].metadata.fileType;
|
if (!task.fileType) task.fileType = res[0].metadata.fileType;
|
||||||
|
|
||||||
if (task.fileName)
|
if (!task.fileName)
|
||||||
task.fileName = res[0].filename || res[0]._id.toString();
|
task.fileName = res[0].filename || res[0]._id.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-1
@@ -501,7 +501,7 @@ function faultStruct(xml) {
|
|||||||
|
|
||||||
function fault(xml) {
|
function fault(xml) {
|
||||||
let faultCode, faultString, detail;
|
let faultCode, faultString, detail;
|
||||||
for (const c of xml.childNodes) {
|
for (const c of xml.childNodes()) {
|
||||||
switch (c.name()) {
|
switch (c.name()) {
|
||||||
case "faultcode":
|
case "faultcode":
|
||||||
faultCode = c.text();
|
faultCode = c.text();
|
||||||
@@ -546,6 +546,7 @@ function request(data, cwmpVersion, warn) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (headerElement) {
|
||||||
for (const c of headerElement.childNodes()) {
|
for (const c of headerElement.childNodes()) {
|
||||||
switch (c.name()) {
|
switch (c.name()) {
|
||||||
case "ID":
|
case "ID":
|
||||||
@@ -556,6 +557,7 @@ function request(data, cwmpVersion, warn) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (const methodElement of bodyElement.childNodes()) {
|
for (const methodElement of bodyElement.childNodes()) {
|
||||||
const methodName = methodElement.name();
|
const methodName = methodElement.name();
|
||||||
|
|||||||
Reference in new issue
Block a user