From f8bfbd28208bf6008fa61edb7fbbe7c7386b2c93 Mon Sep 17 00:00:00 2001 From: Michael Jackson Date: Mon, 22 Apr 2013 20:09:04 -0700 Subject: [PATCH] Don't use module object in CommonJS Fixes #308 Fixes #285 --- mustache.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/mustache.js b/mustache.js index 4c9f090..9294385 100644 --- a/mustache.js +++ b/mustache.js @@ -5,15 +5,19 @@ /*global define: false*/ -(function (root, mustache) { +(function (root, factory) { if (typeof exports === "object" && exports) { - module.exports = mustache; // CommonJS - } else if (typeof define === "function" && define.amd) { - define(mustache); // AMD + factory(exports); // CommonJS } else { - root.Mustache = mustache; //