File tree 1 file changed +6
-12
lines changed
1 file changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -270,24 +270,18 @@ private static async Task ProcessFrame(Frame frame)
270
270
{
271
271
var httpPatches = patches . Where ( p => p . MatchRegexString . ToLower ( ) . StartsWith ( "http" ) ) ;
272
272
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 )
274
275
{
275
- foreach ( var patch in patchEntries )
276
- {
277
- await InjectAsync ( frame , patch , url ) ;
278
- return ;
279
- }
276
+ await InjectAsync ( frame , patch , url ) ;
280
277
}
281
278
}
282
279
else
283
280
{
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 )
285
283
{
286
- foreach ( var patch in patches )
287
- {
288
- await InjectAsync ( frame , patch , url ) ;
289
- return ;
290
- }
284
+ await InjectAsync ( frame , patch , url ) ;
291
285
}
292
286
}
293
287
}
You can’t perform that action at this time.
0 commit comments