Skip to content

Commit

Permalink
[js] try exposing to exports before window (closes #4524)
Browse files Browse the repository at this point in the history
  • Loading branch information
nadako committed Apr 26, 2016
1 parent f140622 commit 4152088
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/generators/genjs.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1345,7 +1345,7 @@ let generate com =

let var_exports = (
"$hx_exports",
"typeof window != \"undefined\" ? window : typeof exports != \"undefined\" ? exports : typeof self != \"undefined\" ? self : this"
"typeof exports != \"undefined\" ? exports : typeof window != \"undefined\" ? window : typeof self != \"undefined\" ? self : this"
) in

let var_global = (
Expand Down

1 comment on commit 4152088

@mockey
Copy link
Contributor

@mockey mockey commented on 4152088 Oct 18, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can it be that browserify doesn't like this?
If have a haxe js with an exposed function which gets attached to exports now, but browserify doesn't pick it up from there. It works with window or global, though.

Please sign in to comment.