commit | 703142f2fc232ab97afed178a8877bfd77fdf503 | [log] [tgz] |
---|---|---|
author | Avery Pennarun <apenwarr@gmail.com> | Fri Nov 30 03:42:06 2012 -0500 |
committer | Avery Pennarun <apenwarr@gmail.com> | Mon Dec 10 02:03:35 2012 -0500 |
tree | d9007f55371c0c8b821cd669c4996aec510a3268 | |
parent | 41f42df18b0328ef8d163c41702018331406db4f [diff] |
orderBy() should produce a new grid, not modify the existing one.
diff --git a/render.js b/render.js index 1c0d51a..215a44e 100644 --- a/render.js +++ b/render.js
@@ -711,8 +711,9 @@ } return 0; } - grid.data.sort(comparator); - return grid; + var outdata = grid.data.concat(); + outdata.sort(comparator); + return { headers: grid.headers, data: outdata, types: grid.types }; }