From 2afdb083fc4c87d0300322113a2ec62782db051e Mon Sep 17 00:00:00 2001 From: Bastian Bleker Date: Tue, 7 Aug 2012 17:01:41 +0300 Subject: [PATCH] fixed CommonJS check QUnit defines module too. If you try to use mustache in a QUnit and AMD environment it won't work --- mustache.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mustache.js b/mustache.js index 4286635..9e20b87 100644 --- a/mustache.js +++ b/mustache.js @@ -8,7 +8,7 @@ var Mustache; (function (exports) { - if (typeof module !== "undefined") { + if (typeof module !== "undefined" && typeof module.exports !== "undefined") { module.exports = exports; // CommonJS } else if (typeof define === "function") { define(exports); // AMD