Skip to content

Commit

Permalink
Fix bugs and linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaceManiac committed May 2, 2024
1 parent 7d001f4 commit 03dfff7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/engine/paima-rest/src/EngineService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export class EngineService {
this.achievements = alike.achievements;
}

getSM = () => this.stateMachine;
getSM = (): GameStateMachine => this.stateMachine;

// Singleton
private static _instance?: EngineService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion packages/engine/paima-standalone/src/utils/import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function checkForPackedGameCode(): boolean {
function importFile<T>(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 {
Expand Down

0 comments on commit 03dfff7

Please sign in to comment.