Skip to content

Commit

Permalink
[bulletproofing] Check if console exists first before using it, for…
Browse files Browse the repository at this point in the history
… IE compatibility
  • Loading branch information
sdumitriu authored and veronikaslc committed Jul 16, 2018
1 parent 8cf8ed2 commit 7d55597
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ui/src/main/resources/PhenomeCentral/JournalSubmission.xml
Expand Up @@ -169,10 +169,10 @@
if (event.target) {
if (event.target.checked === false) {
// Remove journal collaborator
console.log('Removing journal: ' + j.id);
console && console.log('Removing journal: ' + j.id);
_this._removeJournal(j.id);
} else {
console.log('Adding journal: ' + j.id);
console && console.log('Adding journal: ' + j.id);
_this._addJournal(j);
}
}
Expand All @@ -186,7 +186,7 @@
// Ensure checkbox is checked
var checkbox = this._journalsManager.down('input[type="checkbox"][value="' + j.id + '"]');
if (checkbox) {
console.log('Found checkbox... checking');
console && console.log('Found checkbox... checking');
checkbox.checked = true;
}
this._permissionsManager._collaboratorsList.insert(row);
Expand All @@ -207,7 +207,7 @@
var _this = this;
this._permissionsManager._collaboratorsList.select('tr input[type="hidden"][name="collaborator"').each(function(c) {
_this._journalsManager.select('input[type="checkbox"][name="journal"][value$="' + c.value + '"]').each(function (cb) {
console.log('Found checkbox for ' + c.value + '... checking');
console && console.log('Found checkbox for ' + c.value + '... checking');
cb.checked = true;
var cRow = c.up('tr');
cRow.addClassName('journal');
Expand Down Expand Up @@ -339,7 +339,7 @@ document.observe("phenotips:permissions-manager:loaded", function(event) {
<name/>
</property>
<property>
<parse/>
<parse>0</parse>
</property>
<property>
<use>always</use>
Expand Down

0 comments on commit 7d55597

Please sign in to comment.