bakit 1.0.0-beta.8 → 1.0.0-beta.9

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.
@@ -137,8 +137,8 @@ var BaseEntry = class {
137
137
  };
138
138
  }
139
139
  addHook(state, target, descriptor) {
140
- if (target.constructor !== this.target) {
141
- throw new Error("Hook is used at unknown constructor.");
140
+ if (this.target && this.target !== target.constructor) {
141
+ throw new Error("Hook is used at wrong constructor.");
142
142
  }
143
143
  const { value: method } = descriptor;
144
144
  if (typeof method !== "function") {
package/dist/index.js CHANGED
@@ -54,8 +54,8 @@ var BaseEntry = class {
54
54
  };
55
55
  }
56
56
  addHook(state, target, descriptor) {
57
- if (target.constructor !== this.target) {
58
- throw new Error("Hook is used at unknown constructor.");
57
+ if (this.target && this.target !== target.constructor) {
58
+ throw new Error("Hook is used at wrong constructor.");
59
59
  }
60
60
  const { value: method } = descriptor;
61
61
  if (typeof method !== "function") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bakit",
3
- "version": "1.0.0-beta.8",
3
+ "version": "1.0.0-beta.9",
4
4
  "description": "A framework for discord.js",
5
5
  "type": "module",
6
6
  "exports": {