Skip to content

Commit

Permalink
Merge pull request vitmalina#1479 from mpf82/issue_1421
Browse files Browse the repository at this point in the history
Issue 1421
  • Loading branch information
mrg2001 authored Jan 24, 2017
2 parents e2a22d0 + 5b81ffa commit b989c75
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/w2fields.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@
if (!$.isPlainObject(options.selected) && options.items) {
for (var i = 0; i< options.items.length; i++) {
var item = options.items[i];
if (item && item.id == options.selected) {
if (item && item.id === options.selected) {
options.selected = $.extend(true, {}, item);
break;
}
Expand Down Expand Up @@ -1844,7 +1844,7 @@
var sel = $(input).data('selected');
if ($.isPlainObject(sel) && !$.isEmptyObject(sel) && options.index == -1) {
options.items.forEach(function (item, ind) {
if (item.id == sel.id) {
if (item.id === sel.id) {
options.index = ind;
}
});
Expand Down
6 changes: 3 additions & 3 deletions src/w2grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@
},

set: function (recid, record, noRefresh) { // does not delete existing, but overrides on top of it
if (typeof recid == 'object') {
if ((typeof recid == 'object') && (recid !== null)) {
noRefresh = record;
record = recid;
recid = null;
Expand Down Expand Up @@ -3037,7 +3037,7 @@
var column = null;
var obj = this;
if (this.last.cancelClick == true || (event && event.altKey)) return;
if (typeof recid == 'object') {
if ((typeof recid == 'object') && (recid !== null)) {
column = recid.column;
recid = recid.recid;
}
Expand Down Expand Up @@ -3701,7 +3701,7 @@
dblClick: function (recid, event) {
// find columns
var column = null;
if (typeof recid == 'object') {
if ((typeof recid == 'object') && (recid !== null)) {
column = recid.column;
recid = recid.recid;
}
Expand Down

0 comments on commit b989c75

Please sign in to comment.