File tree Expand file tree Collapse file tree 1 file changed +1
-5
lines changed
packages/runtime/src/enhancements/policy Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -570,17 +570,13 @@ export class PolicyUtil extends QueryUtils {
570
570
*/
571
571
getCheckerConstraint ( model : string , operation : PolicyCrudKind ) : ReturnType < CheckerFunc > | boolean {
572
572
const checker = this . getModelChecker ( model ) ;
573
- if ( ! checker ) {
574
- throw this . unknownError ( `unable to load policy guard for ${ model } ` ) ;
575
- }
576
-
577
573
const provider = checker [ operation ] ;
578
574
if ( typeof provider === 'boolean' ) {
579
575
return provider ;
580
576
}
581
577
582
578
if ( typeof provider !== 'function' ) {
583
- throw this . unknownError ( `unable to load ${ operation } checker for ${ model } ` ) ;
579
+ throw this . unknownError ( `invalid ${ operation } checker function for ${ model } ` ) ;
584
580
}
585
581
586
582
// call checker function
You can’t perform that action at this time.
0 commit comments