File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -270,24 +270,18 @@ private static async Task ProcessFrame(Frame frame)
270270 {
271271 var httpPatches = patches . Where ( p => p . MatchRegexString . ToLower ( ) . StartsWith ( "http" ) ) ;
272272 var patchEntries = httpPatches as PatchEntry [ ] ?? httpPatches . ToArray ( ) ;
273- if ( patchEntries . Any ( p => p . MatchRegex . IsMatch ( frame . Url ) ) )
273+ var patch = patchEntries . FirstOrDefault ( p => p . MatchRegex . IsMatch ( frame . Url ) ) ;
274+ if ( patch != null )
274275 {
275- foreach ( var patch in patchEntries )
276- {
277- await InjectAsync ( frame , patch , url ) ;
278- return ;
279- }
276+ await InjectAsync ( frame , patch , url ) ;
280277 }
281278 }
282279 else
283280 {
284- if ( patches . Any ( p => p . MatchRegex . IsMatch ( frame . Url ) ) )
281+ var patch = patches . FirstOrDefault ( p => p . MatchRegex . IsMatch ( frame . Url ) ) ;
282+ if ( patch != null )
285283 {
286- foreach ( var patch in patches )
287- {
288- await InjectAsync ( frame , patch , url ) ;
289- return ;
290- }
284+ await InjectAsync ( frame , patch , url ) ;
291285 }
292286 }
293287 }
You can’t perform that action at this time.
0 commit comments