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,6 +361,8 @@ function isWaringState(printer)
|
|||
return true;
|
||||
}
|
||||
|
||||
if(printer.attrs.hasOwnProperty("printer-state-reasons"))
|
||||
{
|
||||
for(var i in printer.attrs["printer-state-reasons"].value)
|
||||
{
|
||||
var value = printer.attrs["printer-state-reasons"].value[i];
|
||||
|
@ -369,6 +371,7 @@ function isWaringState(printer)
|
|||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue