From 7e9e00c9ea66e4fb615965ce38e7df553c2045e2 Mon Sep 17 00:00:00 2001 From: Irene Ros Date: Fri, 26 Oct 2012 13:49:55 -0400 Subject: [PATCH] Making sure _initialize routine kicks off regardless of options. --- grunt.js | 4 ++-- src/constructor.js | 8 ++++---- test/index.html | 25 +++++++++++++------------ 3 files changed, 19 insertions(+), 18 deletions(-) diff --git a/grunt.js b/grunt.js index 4b8fb87..cb14a41 100644 --- a/grunt.js +++ b/grunt.js @@ -35,7 +35,6 @@ module.exports = function(grunt) { "src/sync.js", "src/builder.js", "src/product.js", - "src/derived.js", "src/importer.js", "src/importers/local.js", "src/importers/remote.js", @@ -45,7 +44,8 @@ module.exports = function(grunt) { "src/parsers/strict.js", "src/parsers/object.js", "src/parsers/google_spreadsheet.js", - "src/parsers/delimited.js" + "src/parsers/delimited.js", + "src/derived.js" ] }, diff --git a/src/constructor.js b/src/constructor.js index cf7de78..cf12cbc 100644 --- a/src/constructor.js +++ b/src/constructor.js @@ -33,15 +33,15 @@ */ global.Miso = global.Miso || {}; global.Miso.Dataset = function(options) { + + options = options || {}; + this.length = 0; this._columns = []; this._columnPositionByName = {}; this._computedColumns = []; - if (typeof options !== "undefined") { - options = options || {}; - this._initialize(options); - } + this._initialize(options); }; }(this)); diff --git a/test/index.html b/test/index.html index c2b8162..8a6f9ac 100644 --- a/test/index.html +++ b/test/index.html @@ -27,7 +27,6 @@ - @@ -38,6 +37,7 @@ + @@ -54,17 +54,6 @@ - - - - - - - - - - - @@ -77,5 +66,17 @@


Speed Suite

+ + + + + + + + + + + +