Skip to content

Commit

Permalink
Revert "fix(Structures): allow multiple extensions by checking protot…
Browse files Browse the repository at this point in the history
…ype chain (discordjs#3217)"

This reverts commit 33ede42.
  • Loading branch information
samsamson33 committed Feb 27, 2020
1 parent bab9bc5 commit 4c95561
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/util/Structures.js
Expand Up @@ -55,8 +55,8 @@ class Structures {
throw new TypeError(`The extender function must return the extended structure class/prototype ${received}.`);
}

if (!(extended.prototype instanceof structures[structure])) {
const prototype = Object.getPrototypeOf(extended);
const prototype = Object.getPrototypeOf(extended);
if (prototype !== structures[structure]) {
const received = `${extended.name || 'unnamed'}${prototype.name ? ` extends ${prototype.name}` : ''}`;
throw new Error(
'The class/prototype returned from the extender function must extend the existing structure class/prototype' +
Expand Down

0 comments on commit 4c95561

Please sign in to comment.