File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -147,7 +147,7 @@ class RestrictionsManager extends TypedEmitter<Events> {
147147 }
148148 return Promise . resolve ( ) ;
149149
150- } else if ( restrictionData . mode === "all" ) {
150+ } else if ( restrictionData . mode === "all" || restrictionData . mode == null ) {
151151 const predicatePromises = [ ] ;
152152 for ( const restriction of restrictions ) {
153153 const restrictionDef = this . getRestrictionById ( restriction . type ) ;
@@ -165,6 +165,8 @@ class RestrictionsManager extends TypedEmitter<Events> {
165165 }
166166 } ) ;
167167 }
168+ // eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors, @typescript-eslint/restrict-template-expressions
169+ return Promise . reject ( `Invalid restriction mode '${ restrictionData . mode } '` ) ;
168170 }
169171}
170172
You can’t perform that action at this time.
0 commit comments