Skip to content
Snippets Groups Projects
Commit fc5d72df authored by Sandro Lutz's avatar Sandro Lutz
Browse files

Change checks with typeof to falsiness

parent 32411e5a
No related branches found
No related tags found
1 merge request!29Joboffers
......@@ -9,7 +9,7 @@ let querySaved = {};
export function getList() {
if (typeof this.list === 'undefined') {
if (!this.list) {
return [];
}
return this.list;
......@@ -47,7 +47,7 @@ export function load(query = {}) {
export function selectOffer(offerId) {
this.selectedOffer = this.getList().find(item => item._id === offerId);
if (typeof this.selectedOffer === 'undefined') {
if (!this.selectedOffer) {
this.load({
where: {
time_end: { $gte: date },
......
......@@ -11,7 +11,7 @@ export default class JobOfferDetails {
static view() {
const jobOffer = jobs.getSelectedOffer();
if (typeof jobOffer === 'undefined') {
if (!jobOffer) {
return m('');
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment