Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
jasongin committed Aug 15, 2024
1 parent 9c19f88 commit a1a86ef
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/NodeApi.DotNetHost/ManagedHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ public static napi_value InitializeModule(napi_env env, napi_value exports)
{
// The dependency assembly was not resolved by an event-handler.
// Look for it in the same directory as any already-loaded assemblies.
foreach (var loadedAssemblyFile in
foreach (string? loadedAssemblyFile in
_loadedModules.Keys.Concat(_loadedAssembliesByPath.Keys))
{
string assemblyDirectory =
Expand Down Expand Up @@ -458,8 +458,7 @@ public JSValue LoadAssembly(JSCallbackArgs args)
{
string assemblyNameOrFilePath = (string)args[0];

Assembly? assembly;
if (!_loadedAssembliesByPath.TryGetValue(assemblyNameOrFilePath, out assembly) &&
if (!_loadedAssembliesByPath.TryGetValue(assemblyNameOrFilePath, out Assembly? assembly) &&
!_loadedAssembliesByName.TryGetValue(assemblyNameOrFilePath, out assembly))
{
assembly = LoadAssembly(assemblyNameOrFilePath, allowNativeLibrary: true);
Expand Down

0 comments on commit a1a86ef

Please sign in to comment.