diff --git a/frontend/src/Metamaps/Views/ChatView.js b/frontend/src/Metamaps/Views/ChatView.js index 473c6f1e..9bd8b563 100644 --- a/frontend/src/Metamaps/Views/ChatView.js +++ b/frontend/src/Metamaps/Views/ChatView.js @@ -8,6 +8,7 @@ import Backbone from 'backbone' import Autolinker from 'autolinker' import _ from 'lodash' +import underscore from 'underscore' // TODO is this line good or bad // Backbone.$ = window.$ @@ -29,12 +30,12 @@ var Private = { "
" + "", templates: function() { - _.templateSettings = { + underscore.templateSettings = { interpolate: /\{\{(.+?)\}\}/g }; - this.messageTemplate = _.template(Private.messageHTML); + this.messageTemplate = underscore.template(Private.messageHTML); - this.participantTemplate = _.template(Private.participantHTML); + this.participantTemplate = underscore.template(Private.participantHTML); }, createElements: function() { this.$unread = $('
'); diff --git a/package.json b/package.json index c6c74f44..106294fd 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,7 @@ "babel-preset-es2015": "6.14.0", "babel-preset-react": "6.11.1", "backbone": "1.0.0", + "underscore": "1.4.4", "csv-parse": "1.1.7", "lodash": "4.16.1", "node-uuid": "1.4.7",