Skip to content

Commit

Permalink
Fix brunch wrapping
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismccord committed Jan 20, 2016
1 parent 3605909 commit aa4f786
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion brunch-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ exports.config = {
// 2. the exports variable does not leak
// 3. the Socket, Channel variables and so on do not leak
wrapper: function(path, code){
return "(function(){\nif(typeof(exports) === \"undefined\" && !window.Phoenix){ window.Phoenix = {}; var exports = window.Phoenix; }\n" + code + "\n})();\n";
return "(function(exports){\n" + code + "\n})(typeof(exports) === \"undefined\" ? window.Phoenix = window.Phoenix || {} : exports);\n";
}
},

Expand Down
5 changes: 2 additions & 3 deletions priv/static/phoenix.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
(function(){
if(typeof(exports) === "undefined" && !window.Phoenix){ window.Phoenix = {}; var exports = window.Phoenix; }
(function(exports){
"use strict";

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
Expand Down Expand Up @@ -1024,4 +1023,4 @@ var Timer = function () {
}();


})();
})(typeof(exports) === "undefined" ? window.Phoenix = window.Phoenix || {} : exports);

0 comments on commit aa4f786

Please sign in to comment.