Skip to content

Commit

Permalink
Fixes oven-sh#2895
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarred-Sumner committed May 16, 2023
1 parent 366eba7 commit 3adadff
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/bundler/entry_points.zig
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,9 @@ pub const ServerEntryPoint = struct {
\\export * from '{s}{s}';
\\var entryNamespace = start;
\\var cjs = start?.default;
\\if (cjs && cjsSymbol in cjs) {{
\\if (cjs && typeof cjs === 'function' && cjsSymbol in cjs) {{
\\ // if you module.exports = (class {{}}), don't call it
\\ entryNamespace = import.meta.primordials.isCallable(cjs) ? cjs() : cjs;
\\ entryNamespace = ("prototype" in cjs) ? cjs : cjs();
\\}}
\\if (typeof entryNamespace?.then === 'function') {{
\\ entryNamespace = entryNamespace.then((entryNamespace) => {{
Expand Down Expand Up @@ -233,9 +233,9 @@ pub const ServerEntryPoint = struct {
\\export * from '{s}{s}';
\\var entryNamespace = start;
\\var cjs = start?.default;
\\if (cjs && cjsSymbol in cjs) {{
\\if (cjs && typeof cjs === 'function' && cjsSymbol in cjs) {{
\\ // if you module.exports = (class {{}}), don't call it
\\ entryNamespace = import.meta.primordials.isCallable(cjs) ? cjs() : cjs;
\\ entryNamespace = ("prototype" in cjs) ? cjs : cjs();
\\}}
\\if (typeof entryNamespace?.then === 'function') {{
\\ entryNamespace = entryNamespace.then((entryNamespace) => {{
Expand Down

0 comments on commit 3adadff

Please sign in to comment.