Skip to content

Commit

Permalink
Do not set up underscore.string globally.
Browse files Browse the repository at this point in the history
  • Loading branch information
bjacobel committed Mar 31, 2016
1 parent a8c2d7d commit 41adf01
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
3 changes: 1 addition & 2 deletions cms/static/js/certificates/models/signatory.js
Expand Up @@ -3,8 +3,7 @@
define([ // jshint ignore:line
'underscore',
'backbone',
'backbone-relational',
'underscore.string'
'backbone-relational'
],
function(_, Backbone) {
'use strict';
Expand Down
10 changes: 5 additions & 5 deletions lms/static/lms/js/require-config.js
Expand Up @@ -29,11 +29,11 @@
};
defineDependency("jQuery", "jquery");
defineDependency("_", "underscore");
defineDependency("s", "underscore.string");
// Underscore.string no longer installs itself directly on "_". For compatibility with existing
// code, add it to "_" with its previous name.
if (window._ && window.s) {
window._.str = window.s;
if (window._ && window._.str) {
define("underscore.string", [], function () {return window._.str;});
}
else {
console.error("Expected _.str (underscore.string) to be on the window object, but not found.");
}
defineDependency("gettext", "gettext");
defineDependency("Logger", "logger");
Expand Down

0 comments on commit 41adf01

Please sign in to comment.