Permalink
Browse files

[ui][xs]: fix config options.config broken in last commit.

  • Loading branch information...
1 parent 15c8d57 commit a752dcfff60ce461ed3f9bf10cf2cfa60aea178a @rufuspollock rufuspollock committed Jun 5, 2012
Showing with 6 additions and 4 deletions.
  1. +3 −2 pkg/ckanjs.js
  2. +3 −2 src/ui.js
View
@@ -692,11 +692,12 @@ CKAN.UI = function($) {
my.workspace = this;
var defaultConfig = {
- endpoint: 'http://ckan.net',
+ endpoint: 'http://datahub.io',
apiKey: ''
};
- this.config = _.extend({}, defaultConfig, options);
+ var _cfg = options ? options.config : {};
+ this.config = _.extend({}, defaultConfig, _cfg);
this.client = new CKAN.Client(this.config);
if (this.config.fixtures && this.config.fixtures.datasets) {
$.each(this.config.fixtures.datasets, function(idx, obj) {
View
@@ -24,11 +24,12 @@ CKAN.UI = function($) {
my.workspace = this;
var defaultConfig = {
- endpoint: 'http://ckan.net',
+ endpoint: 'http://datahub.io',
apiKey: ''
};
- this.config = _.extend({}, defaultConfig, options);
+ var _cfg = options ? options.config : {};
+ this.config = _.extend({}, defaultConfig, _cfg);
this.client = new CKAN.Client(this.config);
if (this.config.fixtures && this.config.fixtures.datasets) {
$.each(this.config.fixtures.datasets, function(idx, obj) {

0 comments on commit a752dcf

Please sign in to comment.