Skip to content

Commit

Permalink
fix: fixes type in mongoose error message
Browse files Browse the repository at this point in the history
  • Loading branch information
stalniy committed Oct 30, 2022
1 parent 2862915 commit 1d28496
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/casl-mongoose/src/accessible_records.ts
Expand Up @@ -31,7 +31,7 @@ function accessibleBy<T extends AnyMongoAbility>(
});

if (!subjectType) {
throw new TypeError(`Cannot detect subjec type of "${baseQuery.model.modelName}" to return accessible records`);
throw new TypeError(`Cannot detect subject type of "${baseQuery.model.modelName}" to return accessible records`);
}

const query = toMongoQuery(ability, subjectType, action);
Expand Down

0 comments on commit 1d28496

Please sign in to comment.