Skip to content

Commit

Permalink
refactor(render): replace Object.values with Object.keys and Array.map
Browse files Browse the repository at this point in the history
  • Loading branch information
remarkablemark committed Apr 20, 2024
1 parent a54e846 commit 1e7a6a1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/render/gameobject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ import { isValidElement } from '../element';
import { setProps } from './props';
import { attachRef } from './ref';

const gameObjects = Object.values(GameObjects);
const gameObjects = Object.keys(GameObjects).map(
(key) => GameObjects[key as keyof typeof GameObjects],
);

/**
* Creates Phaser game object and adds it to the container.
Expand Down

0 comments on commit 1e7a6a1

Please sign in to comment.