2017-04-21 15:52:16 +02:00
|
|
|
/*global define */
|
|
|
|
define(['lodash'], function (_) {
|
2017-06-14 17:15:39 +02:00
|
|
|
if (!_.isUndefined(require) && !_.isUndefined(require.s)) {
|
2017-05-01 12:40:29 +02:00
|
|
|
/* XXX: This is a hack to make sure that the compiled templates have
|
|
|
|
* access to the _ object.
|
|
|
|
*
|
|
|
|
* Otherwise we sometimes get errors like this:
|
|
|
|
*
|
|
|
|
* TypeError: Cannot read property 'escape' of undefined
|
|
|
|
* at eval (./src/templates/chatroom_sidebar.html:6)
|
|
|
|
*/
|
|
|
|
var lodashLoader = require.s.contexts._.config.lodashLoader;
|
|
|
|
lodashLoader.templateSettings.imports = { '_': _ };
|
|
|
|
require.config({'lodashLoader': lodashLoader});
|
|
|
|
}
|
2017-04-21 15:52:16 +02:00
|
|
|
return _.noConflict();
|
|
|
|
});
|