Add function argument defaults.

This will cause the function to return a safe (false) value
rather than erroring.
This commit is contained in:
D. Berge
2025-07-12 16:40:18 +02:00
parent 55855d66e9
commit a7e02c526b

View File

@@ -7,7 +7,7 @@
* @return `true` is user has access to `operation` through * @return `true` is user has access to `operation` through
* a common organisation, `false` otherwise. * a common organisation, `false` otherwise.
*/ */
function access (userOrgs, projectOrgs, operation) { function access (userOrgs = {}, projectOrgs = {}, operation = undefined) {
// console.log("userOrgs", userOrgs); // console.log("userOrgs", userOrgs);
// console.log("projectOrgs", projectOrgs); // console.log("projectOrgs", projectOrgs);
// console.log("operation", operation); // console.log("operation", operation);