From 80458a335ad636ad4bbc1c2604cd73a3aa4c9f15 Mon Sep 17 00:00:00 2001 From: Luke Sneeringer Date: Mon, 25 Jul 2016 11:15:32 -0500 Subject: [PATCH] Allow Record subclasses This change allows Record subclasses to satisfy the check for a Record. --- src/record.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/record.js b/src/record.js index 4e9da5e..1896022 100644 --- a/src/record.js +++ b/src/record.js @@ -44,9 +44,7 @@ class TypedRecord extends IterableKeyedBase { [Typed.read](structure) { const Type = this.constructor - if (structure instanceof Type && - structure && - structure.constructor === Type) { + if (structure && structure instanceof Type) { return structure }