diff --git a/packages/engine/paima-rest/src/EngineService.ts b/packages/engine/paima-rest/src/EngineService.ts index 735ca32d..2712049f 100644 --- a/packages/engine/paima-rest/src/EngineService.ts +++ b/packages/engine/paima-rest/src/EngineService.ts @@ -14,7 +14,7 @@ export class EngineService { this.achievements = alike.achievements; } - getSM = () => this.stateMachine; + getSM = (): GameStateMachine => this.stateMachine; // Singleton private static _instance?: EngineService; diff --git a/packages/engine/paima-rest/src/controllers/AchievementsController.ts b/packages/engine/paima-rest/src/controllers/AchievementsController.ts index ad49a042..89265956 100644 --- a/packages/engine/paima-rest/src/controllers/AchievementsController.ts +++ b/packages/engine/paima-rest/src/controllers/AchievementsController.ts @@ -66,7 +66,7 @@ export class AchievementsController extends Controller { const meta = await this.meta(); const filtered = meta.list .filter(ach => category === undefined || category === ach.category) - .filter(ach => isActive === null || isActive === ach.isActive); + .filter(ach => isActive === undefined || isActive === ach.isActive); this.setHeader('Content-Language', acceptLanguages[0]); return { diff --git a/packages/engine/paima-standalone/src/utils/import.ts b/packages/engine/paima-standalone/src/utils/import.ts index f379f961..977bf27c 100644 --- a/packages/engine/paima-standalone/src/utils/import.ts +++ b/packages/engine/paima-standalone/src/utils/import.ts @@ -20,7 +20,7 @@ export function checkForPackedGameCode(): boolean { function importFile(path: string): T { // dynamic import cannot be used here due to PKG limitations // eslint-disable-next-line @typescript-eslint/no-var-requires - return require(`${process.cwd}/${path}`); + return require(`${process.cwd()}/${path}`); } export interface GameCodeImport {