const isFile = node.qualifier === 'FIL' || node.qualifier === 'UTS';
if (isFile) {
- return Workspace.openComponent({ uuid: node.id });
+ Workspace.openComponent({ uuid: node.id });
+ return;
}
this.fetchComponents(node.key).then(() => {
this.bindShortcuts();
if (this.baseIssue != null) {
this.baseIssue.trigger('locations', this.baseIssue);
- return this.scrollToLine(this.baseIssue.get('line'));
+ this.scrollToLine(this.baseIssue.get('line'));
}
},
if (!selectedIssueView) {
return;
}
- return selectedIssueView.find('.js-issue-' + action).click();
+ selectedIssueView.find('.js-issue-' + action).click();
};
key('up', 'componentViewer', () => {
that.options.app.controller.selectPrev();
});
}
if (firstPage && that.isIssuePermalink()) {
- return that.showComponentViewer(that.options.app.list.first());
+ that.showComponentViewer(that.options.app.list.first());
}
});
},
});
const facetData = r.facets.find(facet => facet.property === id);
if (facetData != null) {
- return facet.set(facetData);
+ facet.set(facetData);
}
});
},
const value = this.options.app.state.get('query').assigned;
if ((value != null) && (!value || value === 'false')) {
- return this.$('.js-facet').filter('[data-unassigned]').addClass('active');
+ this.$('.js-facet').filter('[data-unassigned]').addClass('active');
}
},
props.forEach(prop => {
const value = query[prop];
if (value != null) {
- return that.$(`input[name=${prop}]`).val(value);
+ that.$(`input[name=${prop}]`).val(value);
}
});
let values = this.model.getValues();
BaseFacet.prototype.onRender.apply(this, arguments);
const value = this.options.app.state.get('query').resolved;
if ((value != null) && (!value || value === 'false')) {
- return this.$('.js-facet').filter('[data-unresolved]').addClass('active');
+ this.$('.js-facet').filter('[data-unresolved]').addClass('active');
}
},
handleToggleUser (user, permission) {
if (user.login === '<creator>') {
- return this.handleToggleProjectCreator(user, permission);
+ this.handleToggleProjectCreator(user, permission);
+ return;
}
const { template } = this.props;
const hasPermission = user.permissions.includes(permission);
return;
}
this.disableForm();
- return this.model.changePassword(oldPassword, password, {
+ this.model.changePassword(oldPassword, password, {
statusCode: {
// do not show global error
400: null
}
this.disableForm();
this.options.detailView.disableControls();
- return $.post(url, data)
+ $.post(url, data)
.done(r => this.options.detailView.updateAfterAction(r))
.fail(() => {
this.enableForm();
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
module.exports = function (array, element, options) {
- if (Array.isArray(array)) {
- if (array.indexOf(element) !== -1) {
- return options.fn(this);
- } else {
- return options.inverse(this);
- }
+ if (Array.isArray(array) && array.indexOf(element) !== -1) {
+ return options.fn(this);
+ } else {
+ return options.inverse(this);
}
};
if (typeof str === 'string') {
const LIMIT = 30;
return str.length > LIMIT ? str.substr(0, LIMIT) + '...' : str;
+ } else {
+ return '';
}
};