@colyseus/core 0.18.18 → 0.18.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/Room.cjs CHANGED
@@ -148,9 +148,6 @@ var Room = class _Room {
148
148
  this._events.once("dispose", () => {
149
149
  this.#_dispose().catch((e) => (0, import_Debug.debugAndPrintError)(`onDispose error: ${e && e.stack || e.message || e || "promise rejected"} (roomId: ${this.roomId})`)).finally(() => this._events.emit("disconnect"));
150
150
  });
151
- if (this.onUncaughtException !== void 0) {
152
- this.#registerUncaughtExceptionHandlers();
153
- }
154
151
  }
155
152
  /**
156
153
  * This property will change on these situations:
@@ -328,6 +325,9 @@ var Room = class _Room {
328
325
  if (this.plugins !== void 0) {
329
326
  (0, import_RoomPlugin.setupRoomPlugins)(this);
330
327
  }
328
+ if (this.onUncaughtException !== void 0) {
329
+ this.#registerUncaughtExceptionHandlers();
330
+ }
331
331
  if (this.messages !== void 0) {
332
332
  if (this.messages["_"]) {
333
333
  this.onMessage("*", this.messages["_"].bind(this));
@@ -1551,7 +1551,7 @@ var Room = class _Room {
1551
1551
  if (this.onCreate !== void 0) {
1552
1552
  this.onCreate = (0, import_Utils.wrapTryCatch)(this.onCreate.bind(this), onUncaughtException, import_RoomExceptions.OnCreateException, "onCreate", true);
1553
1553
  }
1554
- if (this.onAuth !== void 0) {
1554
+ if (this.onAuth !== _Room.prototype.onAuth) {
1555
1555
  this.onAuth = (0, import_Utils.wrapTryCatch)(this.onAuth.bind(this), onUncaughtException, import_RoomExceptions.OnAuthException, "onAuth", true);
1556
1556
  }
1557
1557
  if (this.onJoin !== void 0) {