fix spool weight < 0 check
This commit is contained in:
@@ -189,7 +189,7 @@ export const SpoolList: React.FC<IResourceComponentsProps> = () => {
|
|||||||
|
|
||||||
const archiveSpoolPopup = async (spool: ISpoolCollapsed) => {
|
const archiveSpoolPopup = async (spool: ISpoolCollapsed) => {
|
||||||
// If the spool has no remaining weight, archive it immediately since it's likely not a mistake
|
// If the spool has no remaining weight, archive it immediately since it's likely not a mistake
|
||||||
if (spool.remaining_weight && spool.remaining_weight == 0) {
|
if (spool.remaining_weight != undefined && spool.remaining_weight <= 0) {
|
||||||
await archiveSpool(spool, true);
|
await archiveSpool(spool, true);
|
||||||
} else {
|
} else {
|
||||||
confirm({
|
confirm({
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ export const SpoolShow: React.FC<IResourceComponentsProps> = () => {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
// If the spool has no remaining weight, archive it immediately since it's likely not a mistake
|
// If the spool has no remaining weight, archive it immediately since it's likely not a mistake
|
||||||
if (spool.remaining_weight && spool.remaining_weight == 0) {
|
if (spool.remaining_weight != undefined && spool.remaining_weight <= 0) {
|
||||||
await archiveSpool(spool, true);
|
await archiveSpool(spool, true);
|
||||||
} else {
|
} else {
|
||||||
confirm({
|
confirm({
|
||||||
|
|||||||
Reference in New Issue
Block a user