Skip to content

Commit

Permalink
Merge pull request #39 from philipooo/master
Browse files Browse the repository at this point in the history
replaced with single calls
  • Loading branch information
stefanprodan committed Sep 13, 2014
2 parents 1fc5793 + adcedff commit ed2af34
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions RequireJsNet.ResxToJs/ResxToJsTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public override bool Execute()

private void GetResources(List<ResourceInfo> resouceInfo)
{
var rootResInfo = resouceInfo.Where(r => r.CultureShort.ToLower() == "root").FirstOrDefault();
var rootResInfo = resouceInfo.FirstOrDefault(r => r.CultureShort.ToLower() == "root");
if (rootResInfo == null)
{
throw new Exception("Could not find root resources");
Expand Down Expand Up @@ -126,7 +126,7 @@ private List<ResourceInfo> GetAvailableCultures(List<string> jsCultures)
locale = match.Groups[1].Value;
}

if (jsCultures.Where(r => r.ToLower() == locale.ToLower()).Any())
if (jsCultures.Any(r => r.ToLower() == locale.ToLower()))
{
availableCultures.Add(new ResourceInfo
{
Expand Down

0 comments on commit ed2af34

Please sign in to comment.