Skip to content

Commit

Permalink
fix: Fix merge error
Browse files Browse the repository at this point in the history
  • Loading branch information
Sup3rFire committed Jan 27, 2024
1 parent 425317c commit 3475a36
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/room/Room.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,6 @@ function flattenObject(obj: Record<string, any>, prefix = "") {
}, {});
}

function flattenObject(obj: Record<string, any>, prefix = "") {
return Object.keys(obj).reduce((acc: Record<string, any>, key) => {
const pre = prefix.length ? prefix + "." : "";

if (typeof obj[key] === "object" && obj[key] !== null) {
Object.assign(acc, flattenObject(obj[key], pre + key));
} else {
acc[pre + key] = obj[key];
}

return acc;
}, {});
}

/** Represents the Client's room status. */
export default class Room extends EventEmitter {
constructor(ws: WebSocketManager) {
Expand Down

0 comments on commit 3475a36

Please sign in to comment.