diff --git a/mustache.js b/mustache.js index f1bafa0..700f536 100644 --- a/mustache.js +++ b/mustache.js @@ -5,19 +5,13 @@ /*global define: false*/ -(function (root, factory) { +(function (global, factory) { if (typeof exports === "object" && exports) { factory(exports); // CommonJS + } else if (typeof define === "function" && define.amd) { + define(factory({})); // AMD } else { - var mustache = {}; - - factory(mustache); - - if (typeof define === "function" && define.amd) { - define(mustache); // AMD - } else { - root.Mustache = mustache; //