ソースを参照

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 10年前
コミット
853f9c36df
1個のファイルの変更1行の追加1行の削除
  1. +1
    -1
      mustache.js

+ 1
- 1
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


読み込み中…
キャンセル
保存