diff --git a/import resolver.cs b/import resolver.cs index 4b3d3d9..72d859a 100644 --- a/import resolver.cs +++ b/import resolver.cs @@ -68,6 +68,11 @@ namespace arookas } } } + // make sure the file has not been imported yet + if (imports.Any(i => i.Name == fullPath)) + { + return sunImportResult.Skipped; + } // open the file try { @@ -77,11 +82,6 @@ namespace arookas { return sunImportResult.FailedToLoad; } - // make sure the file has not been imported yet - if (imports.Any(i => i.Name == fullPath)) - { - return sunImportResult.Skipped; - } imports.Add(file); return sunImportResult.Loaded; }