Pārlūkot izejas kodu

Use lodash.noConflict for underscore

JC Brand 8 gadi atpakaļ
vecāks
revīzija
c7d66377d0
2 mainītis faili ar 3 papildinājumiem un 4 dzēšanām
  1. 1 2
      src/config.js
  2. 2 2
      src/underscore-shim.js

+ 1 - 2
src/config.js

@@ -175,8 +175,7 @@ require.config({
         '*': {
             'jquery': 'jquery.noconflict',
             'backbone': 'backbone.noconflict',
-            'lodash': 'lodash.noconflict',
-            'underscore': 'lodash.noconflict'
+            'lodash': 'lodash.noconflict'
          },
         // '*.noconflict' wants the real module
         // If this line was not here, there would

+ 2 - 2
src/underscore-shim.js

@@ -1,4 +1,4 @@
 /*global define */
-define('underscore', ['lodash'], function (_) {
-    return _;
+define(['lodash'], function (_) {
+    return _.noConflict();
 });