diff --git a/mustache.js b/mustache.js index 245c129..03bdcc9 100644 --- a/mustache.js +++ b/mustache.js @@ -6,7 +6,7 @@ /*global define: false Mustache: true*/ (function defineMustache (global, factory) { - if (typeof exports === 'object' && exports) { + if (typeof exports === 'object' && exports && typeof exports.nodeName !== 'string') { factory(exports); // CommonJS } else if (typeof define === 'function' && define.amd) { define(['exports'], factory); // AMD