Make hash jshint-friendlier

This commit is contained in:
Tom MacWright
2012-11-16 11:43:44 -05:00
parent 638af53149
commit 3c3f1a60af
+4 -2
View File
@@ -43,10 +43,12 @@ iD.Hash = function() {
map.off("move", move);
window.removeEventListener("hashchange", hashchange, false);
}
if (map = x) {
map = x;
if (x) {
map.on("move", move);
window.addEventListener("hashchange", hashchange, false);
location.hash ? hashchange() : move();
if (location.hash) hashchange();
else move();
}
return hash;
};