Skip to content

Commit

Permalink
Fix: check extension.prototype in extend method of resource type class
Browse files Browse the repository at this point in the history
  • Loading branch information
sleelin committed Oct 25, 2021
1 parent 00d6c1c commit 09c520d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "scimmy",
"description": "SCIMMY - SCIM m(ade eas)y",
"version": "0.9.9",
"version": "0.9.10",
"author": "sleelin",
"license": "MIT",
"type": "module",
Expand Down
3 changes: 1 addition & 2 deletions src/lib/types/resource.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ export class Resource {
*/
static extend(extension, required) {
if (!this.extensions.find(e => e.schema === extension)) {
// TODO: extension.prototype instanceof Schema
if (extension instanceof Schema) this.extensions.push({schema: extension, required: required});
if (extension.prototype instanceof Schema) this.extensions.push({schema: extension, required: required});
this.schema.extend(extension, required);
}

Expand Down

0 comments on commit 09c520d

Please sign in to comment.