Only check "printer-state-reasons" if it exists
This commit is contained in:
parent
0bd35d647c
commit
8ad40f78a2
1 changed files with 7 additions and 4 deletions
|
@ -361,12 +361,15 @@ function isWaringState(printer)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
for(var i in printer.attrs["printer-state-reasons"].value)
|
if(printer.attrs.hasOwnProperty("printer-state-reasons"))
|
||||||
{
|
{
|
||||||
var value = printer.attrs["printer-state-reasons"].value[i];
|
for(var i in printer.attrs["printer-state-reasons"].value)
|
||||||
if(value != "none" && !(endsWith("-report", value)))
|
|
||||||
{
|
{
|
||||||
return true;
|
var value = printer.attrs["printer-state-reasons"].value[i];
|
||||||
|
if(value != "none" && !(endsWith("-report", value)))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue