Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add UnderscoreJS as a Bob dependency

  • Loading branch information...
commit e75caf8bb54d560f5eaf6374805f66efcea04777 1 parent bdb47fb
@vitorbaptista vitorbaptista authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 app/bob/bob.js
View
6 app/bob/bob.js
@@ -8,7 +8,8 @@ var osw = OpenSpending.Widgets;
osw.QueryBuilder = function(elem, callback, finish, context, spec) {
var self = this;
- var resources = ["//ajax.googleapis.com/ajax/libs/jqueryui/1.8.24/jquery-ui.min.js",
+ var resources = ["//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.4.4/underscore-min.js",
+ "//ajax.googleapis.com/ajax/libs/jqueryui/1.8.24/jquery-ui.min.js",
OpenSpending.scriptRoot + "/app/bob/css/query-builder/jquery-ui-1.8.18.custom.css",
OpenSpending.scriptRoot + "/lib/vendor/handlebars.js"
];
@@ -17,8 +18,7 @@ osw.QueryBuilder = function(elem, callback, finish, context, spec) {
self.hasFinish = finish instanceof Function;
self.noFinish = !self.hasFinish;
- self.context = _.extend({
- }, context);
+ self.context = $.extend({}, context);
@nigelbabu Owner

Is there a specific reason why you change this from _ to $?

Nice catch. I tried to remove all dependencies on Underscore, as (just in Bob) they are all trivial, and we're already loading jQuery anyway. But then I hit a roadblock that I don't remember. Some stuff was harder than I expected, so I changed my mind. I probably forgot to checkout this line, and it got in :/

@nigelbabu Owner

Thanks for fixing! I wanted to be entirely sure I didn't break anything when I updated openspendingjs.

@nigelbabu Owner

Hrm, I don't think you pushed a fix. I'm going to push a fix for this now. Please use a pull request in future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
self.serialize = function() {
state = {};

0 comments on commit e75caf8

Please sign in to comment.
Something went wrong with that request. Please try again.