Permalink
Browse files

Use lenient equality operator (undefined == null).

  • Loading branch information...
1 parent 5aa2717 commit 41e4780252d514a84cd7213a200311bba87c146f @mbostock mbostock committed Nov 27, 2010
Showing with 9 additions and 9 deletions.
  1. +3 −3 polymaps.js
  2. +3 −3 polymaps.min.js
  3. +2 −2 src/Image.js
  4. +1 −1 src/start.js
View
@@ -2,7 +2,7 @@ if (!org) var org = {};
if (!org.polymaps) org.polymaps = {};
(function(po){
- po.version = "2.3+1.0"; // not semver!
+ po.version = "2.3+1.0+1"; // not semver!
var zero = {x: 0, y: 0};
po.ns = {
@@ -1111,7 +1111,7 @@ po.image = function() {
if (typeof url == "function") {
element.setAttribute("opacity", 0);
var tileUrl = url(tile);
- if (tileUrl !== null) {
+ if (tileUrl != null) {
tile.request = po.queue.image(element, tileUrl, function(img) {
delete tile.request;
tile.ready = true;
@@ -1125,7 +1125,7 @@ po.image = function() {
}
} else {
tile.ready = true;
- if (url) element.setAttributeNS(po.ns.xlink, "href", url);
+ if (url != null) element.setAttributeNS(po.ns.xlink, "href", url);
image.dispatch({type: "load", tile: tile});
}
}
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -11,7 +11,7 @@ po.image = function() {
if (typeof url == "function") {
element.setAttribute("opacity", 0);
var tileUrl = url(tile);
- if (tileUrl !== null) {
+ if (tileUrl != null) {
tile.request = po.queue.image(element, tileUrl, function(img) {
delete tile.request;
tile.ready = true;
@@ -25,7 +25,7 @@ po.image = function() {
}
} else {
tile.ready = true;
- if (url) element.setAttributeNS(po.ns.xlink, "href", url);
+ if (url != null) element.setAttributeNS(po.ns.xlink, "href", url);
image.dispatch({type: "load", tile: tile});
}
}
View
@@ -2,6 +2,6 @@ if (!org) var org = {};
if (!org.polymaps) org.polymaps = {};
(function(po){
- po.version = "2.3+1.0"; // not semver!
+ po.version = "2.3+1.0+1"; // not semver!
var zero = {x: 0, y: 0};

0 comments on commit 41e4780

Please sign in to comment.