Skip to content
Permalink
Browse files

[bulletproofing] Check if `console` exists first before using it, for…

… IE compatibility
  • Loading branch information...
sdumitriu authored and veronikaslc committed Nov 28, 2017
1 parent bbd5866 commit 93bb2c6ea993ad53a046228b3db714abf1b1373d
Showing with 5 additions and 5 deletions.
  1. +5 −5 ui/src/main/resources/PhenomeCentral/JournalSubmission.xml
@@ -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);
}
}
@@ -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);
@@ -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');
@@ -339,7 +339,7 @@ document.observe("phenotips:permissions-manager:loaded", function(event) {
<name/>
</property>
<property>
<parse/>
<parse>0</parse>
</property>
<property>
<use>always</use>

0 comments on commit 93bb2c6

Please sign in to comment.
You can’t perform that action at this time.