From 4c95561040cbfc7e51ca95f965c856f99c4814e4 Mon Sep 17 00:00:00 2001 From: samsamson33 Date: Thu, 27 Feb 2020 10:10:12 -0500 Subject: [PATCH] Revert "fix(Structures): allow multiple extensions by checking prototype chain (#3217)" This reverts commit 33ede42806694ce158900422c6f67b91daf8ba43. --- src/util/Structures.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/Structures.js b/src/util/Structures.js index 2dc26770f254..5cdfc831a47f 100644 --- a/src/util/Structures.js +++ b/src/util/Structures.js @@ -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' +