Quellcode durchsuchen

Update UMD Shim to be resilient to HTMLElement global pollution

Please see https://github.com/umdjs/umd/pull/63 and https://github.com/umdjs/umd/issues/35 for more information, but
this change prevents an HTML element with an id of `exports` from causing the UMD shim to incorrectly detect the environment as node.
tags/v2.1.3
Mike Sherov vor 10 Jahren
Ursprung
Commit
853f9c36df
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. +1
    -1
      mustache.js

+ 1
- 1
mustache.js Datei anzeigen

@@ -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


Laden…
Abbrechen
Speichern