JSLint: legimate comparisions to 0 and null should be made using ===

git-svn-id: http://google-refine.googlecode.com/svn/trunk@425 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
Will Moffat 2010-04-08 20:18:38 +00:00
parent 41a52f135d
commit fff6eb0aa2
5 changed files with 7 additions and 7 deletions

View File

@ -140,7 +140,7 @@ ReconDialog.prototype._populateDialog = function() {
$(td1).html(type.name + '<br/><span class="recon-dialog-type-id">' + type.id + '</span>');
};
for (var i = 0; i < this._types.length; i++) {
createTypeChoice(this._types[i], i == 0);
createTypeChoice(this._types[i], i === 0);
}
/*
@ -209,7 +209,7 @@ ReconDialog.prototype._rewirePropertySuggests = function(schema) {
ReconDialog.prototype._onOK = function() {
var tab = $("#recon-dialog-tabs").tabs('option', 'selected');
if (tab == 0) {
if (tab === 0) {
this._onDoHeuristic();
} else {
this._onDoStrict();

View File

@ -65,7 +65,7 @@ HistoryWidget.prototype._render = function() {
} else {
for (var i = 0; i < this._data.past.length; i++) {
var entry = this._data.past[i];
renderEntry(elmts.pastDiv, entry, i == 0 ? 0 : this._data.past[i - 1].id, "Undo to here");
renderEntry(elmts.pastDiv, entry, i === 0 ? 0 : this._data.past[i - 1].id, "Undo to here");
}
}

View File

@ -359,7 +359,7 @@ SchemaAlignmentDialog.UILink.prototype._configureTarget = function() {
id: expected_type.id,
name: expected_type.name
};
if (expected_type["/freebase/type_hints/mediator"] == true) {
if (expected_type["/freebase/type_hints/mediator"] === true) {
self._link.target.nodeType = "anonymous";
} else if (expected_type.id == "/type/key") {
self._link.target.nodeType = "cell-as-key";

View File

@ -420,7 +420,7 @@ SchemaAlignmentDialog.UINode.prototype._showNodeConfigDialog = function() {
}
});
if ((!("columnName" in self._node) || !self._node.columnName) && columnIndex == 0) {
if ((!("columnName" in self._node) || !self._node.columnName) && columnIndex === 0) {
radio.attr("checked", "true");
} else if (column.name == self._node.columnName) {
radio.attr("checked", "true");

View File

@ -26,7 +26,7 @@ DataTableCellUI.prototype._render = function() {
.mouseenter(function() { editLink.css("visibility", "visible"); })
.mouseleave(function() { editLink.css("visibility", "hidden"); });
if (!cell || ("v" in cell && cell.v == null)) {
if (!cell || ("v" in cell && cell.v === null)) {
$('<span>').html("&nbsp;").appendTo(divContent);
} else if ("e" in cell) {
$('<span>').addClass("data-table-error").text(cell.e).appendTo(divContent);
@ -315,7 +315,7 @@ DataTableCellUI.prototype._previewCandidateTopic = function(id, elmt) {
DataTableCellUI.prototype._startEdit = function(elmt) {
self = this;
var originalContent = !this._cell || ("v" in this._cell && this._cell.v == null) ? "" : this._cell.v;
var originalContent = !this._cell || ("v" in this._cell && this._cell.v === null) ? "" : this._cell.v;
var menu = MenuSystem.createMenu().addClass("data-table-cell-editor").width("400px");
menu.html(