Skip to content

Commit

Permalink
Export default function assign function name "default"
Browse files Browse the repository at this point in the history
  • Loading branch information
christianrondeau committed Mar 8, 2022
1 parent ca6919a commit abc07b9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Jint/Runtime/Modules/SourceTextModuleRecord.cs
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ protected override void InitializeEnvironment()
var fd = new JintFunctionDefinition(_engine, d);
env.CreateMutableBinding(fn, true);
var fo = realm.Intrinsics.Function.InstantiateFunctionObject(fd, env);
if (fn == "*default*") fo.SetFunctionName("default");
env.InitializeBinding(fn, fo);
}
}
Expand Down

0 comments on commit abc07b9

Please sign in to comment.