Skip to content
This repository has been archived by the owner on Oct 25, 2022. It is now read-only.

Commit

Permalink
fix: Staged buildings not built
Browse files Browse the repository at this point in the history
  • Loading branch information
oliversalzburg committed Apr 27, 2022
1 parent b5e7838 commit 3d9bfe2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/userscript/source/BuildManager.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { BulkManager } from "./BulkManager";
import { CraftManager } from "./CraftManager";
import { TabManager } from "./TabManager";
import { mustExist } from "./tools/Maybe";
import { isNil, mustExist } from "./tools/Maybe";
import { BuildButton, Building, BuildingExt, BuildingMeta } from "./types";
import { UserScript } from "./UserScript";

Expand Down Expand Up @@ -41,7 +41,7 @@ export class BuildManager {
}

private _getBuildLabel(meta: BuildingMeta, stage?: number): string {
return meta.stages && stage ? meta.stages[stage].label : mustExist(meta.label);
return meta.stages && !isNil(stage) ? meta.stages[stage].label : mustExist(meta.label);
}

getBuild(name: Building): BuildingExt {
Expand Down

0 comments on commit 3d9bfe2

Please sign in to comment.