File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed
Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -219,10 +219,19 @@ const checkSecurityFromActionState = (
219219 state : ActionStateWithOrigin ,
220220 normalizedSecurityLevel : NormalizedSecurityLevel ,
221221) : boolean => {
222- return checkSecurity ( state . action , normalizedSecurityLevel . actions ) &&
223- state . origin
224- ? checkSecurity ( state . origin , normalizedSecurityLevel [ state . originType ] )
225- : true ;
222+ const checkAction = checkSecurity (
223+ state . action ,
224+ normalizedSecurityLevel . actions ,
225+ ) ;
226+
227+ if ( ! state . origin ) {
228+ return checkAction ;
229+ }
230+
231+ return (
232+ checkAction &&
233+ checkSecurity ( state . origin , normalizedSecurityLevel [ state . originType ] )
234+ ) ;
226235} ;
227236
228237const DEFAULT_SECURITY_LEVEL : SecurityLevel = 'only-trusted' ;
You can’t perform that action at this time.
0 commit comments