Skip to content

Commit

Permalink
Changes chaining in javascript.
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Scherz committed Jul 26, 2024
1 parent 64bc907 commit 5927076
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions app/assets/javascripts/multivalueinputs.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
window.onload = function() {
window.counts = {

developers: window.counts?.developers || 1,
tech_leads: window.counts?.tech_leads || 1,
departments: window.counts?.departments || 1,
product_owners: window.counts?.product_owners || 1,
admin_users: window.counts?.admin_users || 1

developers: (window.counts && window.counts.developers) || 1,
tech_leads: (window.counts && window.counts.tech_leads) || 1,
departments: (window.counts && window.counts.departments) || 1,
product_owners: (window.counts && window.counts.product_owners) || 1,
admin_users: (window.counts && window.counts.admin_users) || 1
};
};

Expand Down

0 comments on commit 5927076

Please sign in to comment.