Skip to content

Commit

Permalink
Fix #165.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbostock committed Mar 18, 2019
1 parent 98a39fd commit 04a7be9
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 9 deletions.
1 change: 0 additions & 1 deletion README.md
Expand Up @@ -24,7 +24,6 @@ If you use NPM, `npm install d3-scale`. Otherwise, download the [latest release]

```html
<script src="https://d3js.org/d3-array.v1.min.js"></script>
<script src="https://d3js.org/d3-collection.v1.min.js"></script>
<script src="https://d3js.org/d3-color.v1.min.js"></script>
<script src="https://d3js.org/d3-format.v1.min.js"></script>
<script src="https://d3js.org/d3-interpolate.v1.min.js"></script>
Expand Down
1 change: 0 additions & 1 deletion package.json
Expand Up @@ -30,7 +30,6 @@
},
"dependencies": {
"d3-array": "^1.2.0",
"d3-collection": "1",
"d3-format": "1",
"d3-interpolate": "1",
"d3-time": "1",
Expand Down
5 changes: 2 additions & 3 deletions src/ordinal.js
@@ -1,11 +1,10 @@
import {map} from "d3-collection";
import {slice} from "./array";
import {initRange} from "./init";

export var implicit = {name: "implicit"};

export default function ordinal() {
var index = map(),
var index = new Map(),
domain = [],
range = [],
unknown = implicit;
Expand All @@ -21,7 +20,7 @@ export default function ordinal() {

scale.domain = function(_) {
if (!arguments.length) return domain.slice();
domain = [], index = map();
domain = [], index = new Map();
var i = -1, n = _.length, d, key;
while (++i < n) if (!index.has(key = (d = _[i]) + "")) index.set(key, domain.push(d));
return scale;
Expand Down
4 changes: 0 additions & 4 deletions yarn.lock
Expand Up @@ -190,10 +190,6 @@ d3-array@^1.2.0:
version "1.2.4"
resolved "https://registry.yarnpkg.com/d3-array/-/d3-array-1.2.4.tgz#635ce4d5eea759f6f605863dbcfc30edc737f71f"

d3-collection@1:
version "1.0.7"
resolved "https://registry.yarnpkg.com/d3-collection/-/d3-collection-1.0.7.tgz#349bd2aa9977db071091c13144d5e4f16b5b310e"

d3-color@1:
version "1.2.3"
resolved "https://registry.yarnpkg.com/d3-color/-/d3-color-1.2.3.tgz#6c67bb2af6df3cc8d79efcc4d3a3e83e28c8048f"
Expand Down

0 comments on commit 04a7be9

Please sign in to comment.