@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.mjs CHANGED
@@ -119,9 +119,6 @@ var Room = class _Room {
119
119
  this._events.once("dispose", () => {
120
120
  this.#_dispose().catch((e) => debugAndPrintError(`onDispose error: ${e && e.stack || e.message || e || "promise rejected"} (roomId: ${this.roomId})`)).finally(() => this._events.emit("disconnect"));
121
121
  });
122
- if (this.onUncaughtException !== void 0) {
123
- this.#registerUncaughtExceptionHandlers();
124
- }
125
122
  }
126
123
  /**
127
124
  * This property will change on these situations:
@@ -299,6 +296,9 @@ var Room = class _Room {
299
296
  if (this.plugins !== void 0) {
300
297
  setupRoomPlugins(this);
301
298
  }
299
+ if (this.onUncaughtException !== void 0) {
300
+ this.#registerUncaughtExceptionHandlers();
301
+ }
302
302
  if (this.messages !== void 0) {
303
303
  if (this.messages["_"]) {
304
304
  this.onMessage("*", this.messages["_"].bind(this));
@@ -1522,7 +1522,7 @@ var Room = class _Room {
1522
1522
  if (this.onCreate !== void 0) {
1523
1523
  this.onCreate = wrapTryCatch(this.onCreate.bind(this), onUncaughtException, OnCreateException, "onCreate", true);
1524
1524
  }
1525
- if (this.onAuth !== void 0) {
1525
+ if (this.onAuth !== _Room.prototype.onAuth) {
1526
1526
  this.onAuth = wrapTryCatch(this.onAuth.bind(this), onUncaughtException, OnAuthException, "onAuth", true);
1527
1527
  }
1528
1528
  if (this.onJoin !== void 0) {